jQuery1.5 Cheat Sheet
April 4th, 2011
No comments
jQuery Cheat Sheet for version 1.5, use it for quick reference on learning jquery.
Launch PDF file.
jQuery Cheat Sheet for version 1.5, use it for quick reference on learning jquery.
Launch PDF file.
By clicking on an element in DOM, to get the which indexed number of the sibling, you’ll need to use jquery’s .index() method which is easy and useful too.
Let’s give an example,
HTML :
<ul>
<li>first</li>
<li>second</li>
<li>third</li>
</ul>
Javascript:
$('li').click(function () {
alert($(this).index());
});
Enjoy jquery
Joomla Uses Mootools as it’s javascript library by default, so we’ll need to use the jquery’s power of flexibility ie, jquery noConflict. Below are the examples how to use it.