HTML5 Placeholders

HTML5 adds a new attribute to most form elements called a placeholder. Its purpose is to add a short hint inside data entry points that disappear on focus. This type of interaction isn’t new but is new to HTML as of version 5. For this reason not all browsers have implemented this feature. Try it [...]

jQuery: Textarea maxlength

Being able to restrict the maximum length of user input from the interface directly is very convenient and practical in use. We do this a lot with input elements. Unfortunately textarea elements do not natively support the maxlength attribute. This attribute was finally added in HTML5 but at the time of writing Chrome is the [...]

Tip: getting values from an options list

So, if you’ve ever converted an options list into a single array of values you might have intuitively done this: var select = $(‘#mySelectElement’)[0]; var values = new Array(); for (var i=0; i < select.length; i++) { values.push(select.options[i].value); } Pretty boring aye? There is a snazzier (is that a word?) alternative, which is to use [...]

Labs: UI inlineEdit

After my last tutorial on building a simple inlineEdit plugin I converted the concepts into a UI widget. It’s now sitting in labs for you to use, pick apart and devour: http://jquery-ui.googlecode.com/svn/branches/labs/inlineedit/demo.html If you inspect the source code you will notice the structure is quite different. It’s actually pretty much the same functionality wise but [...]

jQuery Inline Edit tutorial

A friend recently asked me to review his edit-in-place code which turned out to be a modification of the one found at http://docs.jquery.com/Tutorials:Edit_in_Place_with_Ajax. Reading the tutorial on that page I asked myself how I would do this differently? Defining a global setClickable() function and then calling $(‘#editInPlace”).click() is totally uncool, essentially limiting yourself to one [...]

jQuery UI Spinner update

Sorry for no news these past few months. It’s been very hectic since the new family addition back in Dec which I managed to keep low key. I feel so guilty now for neglecting this blog and my readers (don’t think I have any regulars anyway so I guess nothing missed!), but hey priorities are [...]

jQuery UI 1.7 released

Today marks the release of jQuery UI 1.6 1.7. Kudos to UI team members who’ve done a fantastic job! I’m pretty excited not only because I’m now part of this fantastic team but also with where UI is headed and how it has progressed thus far. UI is still pretty young compared to other UI [...]

jQuery: how to tell if you’re scroll to bottom?

This is a question a jQuery user asked recently. It’s a simple question without a simple answer. There is no inverse equivalent to scrollTop=0 (i.e. scrollBottom=0) so the solution requires some thought. The scenario is this — we have a fixed height div with overflow:auto and we want to use JavaScript to programmatically scroll to [...]

Microsoft to adopt jQuery

Some exciting news just came out — Microsoft plans to adopt jQuery making it part of their official development platform. So it will be shipped with Visual Studio and have all that intellisense goodness. I’m pretty excited about this news. Though I no longer use Microsoft development products it is a testiment to the world [...]

jQuery.com website redesign

The long overdue redesign of jQuery.com has finally landed! I like the new design as it’s more intuitive and inline with jQuery UI’s design. This redesign will certainly help pitch jQuery to new comers; for many the decision to go with another framework has purely been based on the ugliness of the old jQuery website, [...]