A decade ago HTML and CSS added the ability to, at least signal, validation of form fields. The required
attribute helped inform users which fields were required, while pattern
allowed developers to provide a regular expression to match against an ‘s value. Targeting required fields and validation values with just CSS and HTML was very useful.
Did you know that CSS provides :optional
to allow you to style form elements that aren’t required?
input:optional, select:optional, textarea:optional { border: 1px solid #eee; } [required] { border: 1px solid red; }
In a sense, it feels like :optional
represents :not([required])
, but :optional
is limited to just form fields.
Facebook Open Graph META Tags
It’s no secret that Facebook has become a major traffic driver for all types of websites. Nowadays even large corporations steer consumers toward their Facebook pages instead of the corporate websites directly. And of course there are Facebook “Like” and “Recommend” widgets on every website. One…
RealTime Stock Quotes with MooTools Request.Stocks and YQL
It goes without saying but MooTools’ inheritance pattern allows for creation of small, simple classes that possess immense power. One example of that power is a class that inherits from Request, Request.JSON, and Request.JSONP: Request.Stocks. Created by Enrique Erne, this great MooTools class acts as…
Using Dotter for Form Submissions
One of the plugins I’m most proud of is Dotter. Dotter allows you to create the typical “Loading…” text without using animated images. I’m often asked what a sample usage of Dotter would be; form submission create the perfect situation. The following…
Source link