$(‘.button’).click(function() {
$(‘.box’).animate(
{ deg: 180 },
{
duration: 1200,
step: function(now) {
$(this).css({ transform: ‘rotate(‘ + now + ‘deg)’ });
}
}
);
});
jquery.suggest
jquery.suggest
jQuery Hotkeys
jquery.hotkeys plugin lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost any key combination. It takes one line of code to bind/unbind a hot key combination http://code.google.com/p/js-hotkeys/
jQuery.inArray()
Search for a specified value within an array and return its index (or -1 if not found).
version added: 1.2jQuery.inArray( value, array [, fromIndex ] )
The
$.inArray()
method is similar to JavaScript’s native.indexOf()
method in that it returns -1 when it doesn’t find a match. If the first element within the array matchesvalue
,$.inArray()
returns 0.