JavaScriptMVC adds a bunch of useful jQuery extensions for the dom. Check them out on the left.
Set and animate the inner and outer height and width of elements.
$('#foo').outerWidth(100);
$('#bar').animate({innerWidth: 500});
This is great when you want to include padding and margin in setting the dimensions of elements.
Set and get cookie values:
$.cookie('cookie','value');
Simulate Ajax responses.
$.fixture("/services/tasks.php','fixtures/tasks.json');
Works with jQuery's Ajax converters!
Compare the location of two elements rapidly.
$('#foo').compare($('#bar')) & 2 // true if #bar is before #foo
Get multiple css properties quickly.
$('#foo').curStyles('left','top') //-> {left:'20px',top:'10px'}
Serializes a form into a JSON-like object:
$('form').formParams() //-> {name: 'Justin', favs: ['JS','Ruby']}
Gets or sets the current text selection.
// gets selection info
$('pre').selection() //-> {start: 22, end: 57, range: range}
// sets the selection
$('div').selection(20,22)
Returns elements that have a point within their boundaries.
$('.drop').within(200,200) //-> drops that touch 200,200
Text range utilities.
$('#copy').range() //-> text range that has copy selected