Archive for the ‘HTML’ Category
Textarea Size Limit w/ Counter
TEXTAREAs do not have a native way of specifying a maxlength like INPUTs so most developers use a little piece of JavaScript to help them out. In the old days it was added inline and looked a little something like this: <textarea onkeypress=”return (this.value.length < 50);”></textarea> This would limit your textarea to a max of [...]
In: HTML, jQuery
jQuery 1.4.3 brings HTML5 data support
As of jQuery 1.4.3 HTML5 data- attributes will automatically be pulled into jQuery’s data object. For example, an HTML snippet with data- attributes – <a href=”#” data-fadespeed=”1000″ data-hidden=”true” data-targets=”['one', 'two', 'four']“>Test</a> The attributes can be directly accessed using the .data() method, like so: $(‘a’).data(‘fadespeed’) === 1000; $(‘a’).data(‘hidden’) === true; $(‘a’).data(‘targets’)[2] === ‘four’ Note that strings [...]
In: HTML, jQuery · Tagged with: data, HTML5, jquery
HTML5 – localStorage
HTML5 introduces a new technique for storing precious data locally on the client, window.localStorage. It’s part of the HTML5 specification and is already widely supported in most browsers (even Internet Explorer!). Keep in mind that data being stored on the client is potentially exposed. You wouldn’t want to store anyone’s credit card information, social security [...]
In: HTML, JavaScript · Tagged with: data, HTML5, javascript, Storage
jQuery Templates by Microsoft
Back in 2008, Microsoft began shipping Visual Studio with the jQuery library already included. Now, Microsoft is showing its full support of jQuery by developing a very crafty jQuery template plug-in. Originally, John Resig built a simple prototype of the plug-in which Microsoft has now extended and transformed into something quite spectacular. Rey Bango recently [...]
In: HTML, jQuery · Tagged with: dom manipulation, jquery, microsoft, plug-in, templates

