Skip to content

{ Category Archives } jQuery

jQuery UI 1.7

Finally, jQuery UI 1.6 final is out, renamed 1.7, and it's on google ajax libraries, so it's minimized (45K for the whole thing; .27 sec to download for me, which is nothing, especially if you're loading at the end of your code so the user is busy reading the content of your site). The contributors [...]

$.later: binding jQuery plugin methods

I don't like writing function(){$(this).doStuff()} for callbacks and wanted some more elegant way of binding objects to functions. I could always use something like Prototype's bind, but I don't want to modify built-in types (because John Resig says not to) and I generally just want to bind plugins to jQuery objects, so it ought to [...]

New plugin scrollIntoView

One thing that bugged me about my textpopup plugin was that the popup would not necessarily be visible on screen. datepicker moves the widget to a visible spot on screen, which I find very disconcerting. Ariel Flesler's scrollTo was my inspiration, but it scrolls an element so that its top left corner is at the [...]

Upgrading to jQuery UI 1.6

I've updated my widgets tutorials to use jQuery UI 1.6, pulling the rc5 release off the svn site and turning them into pages rather than posts, since they seem to be so popular. See the widget tutorial and the extending widgets page. Now all I need is for the UI team to officially release 1.6 [...]

jQuery and Haskell

I keep telling myself I'll learn Haskell but my brain usually fries halfway through the tutorial. I've always thought that javascript is LISP in C's clothing, and jQuery helps undress it a bit. Now it turns out that really jQuery is really forcing it to cross-dress in Haskell. I guess I understood Haskell all along!

jQuery CSS parser

Updated 2009-05-03 Every time I create or use a jQuery plugin, I realize that the assigning of behaviors to elements on the page is a design decision, not a programming one, and one that should be made by the guy in charge of the CSS, not the guy in charge of the javascript. Even when [...]

gradient on steroids

I was playing with Brandon Aaron's gradient plugin (based on Steven Slayer's gradient) and started adding options and playing with it, so now you can use named colors, percent sizes, and animation. Download the code. See the demo page.

New UI widgets: textpopup and hebrewKeyboard

Last modified 2009-04-02 The Hebrew pop-up keyboard on the YI site search box was always hard-coded and kind of obtrusive, so I wanted to make a jQuery plugin to add a keyboard to any input type="text" or textarea. To make it more flexible, I factored it into a general-purpose popup widget and the keyboard itself. [...]

Making $.metadata Extensible

$(function(){ $('.example').css({ 'float': 'left', border: '2px solid #0f0', padding: '5px', margin: '5px' }); $('.examplebutton').click(function(){ var opts = eval(/(\({.*}\))/.exec(this.value)[1]); alert(JSON.stringify($(this).prev('.example').metadata(opts))); }).after(''); }); Metadata I put the idea that the metadata plugin should be extensible out on the jquery discussion group, but it got no attention, so I'm documenting it here.

Extending jQuery UI Widgets, The Final Chapter

This page is obsolete (it uses jQuery UI 1.5). Please see the updated page. OK, this is the final update to the widget subclassing. Rather than creating a new method, $.widget.subclass, I created a single base widget $.ui.widget that does nothing but includes the Aspect-Oriented-Programming code and a subclassing method. I put everything in the [...]