Top and Best jQuery tips and tricks
jQuery has already become very popular and it is a must for every web developer. But with it's popularity, it is pretty important for any developer to use it efficiently and intelligently. It is important to know some tips and tricks as they save most important part of any software, that is human effort. In this post, I will be discussing some of the jQuery tips and tricks out of my own collection.
Following is my collection of jQuery tips and trick.
- Always load your jQuery framework from CDN
- Shorthand for $(document).ready()
- How to load jQuery locally when CDN fails
- Use jQuery selectors effieciently
- How to get mouse cursor position
- Disable right click using jQuery
- Find which mouse button clicked using jQuery
- How to find index of Selected element
- How to check if element is empty
- Create clone of any object using jQuery
- Detect Browsers using jQuery
- Make readonly textbox using Jquery
- Disable "Enter" key on page using jQuery
- Set focus on First textbox of page using jQuery
- Set focus on next textbox on Enter Key using jQuery
- Allow only numbers in textbox
- Disable Cut, Copy and Paste using jQuery
- Zoom image on mouseover using jQuery
- Difference between $(this) and 'this' in jQuery
- Disable-Enable all controls of page using jQuery
- Validate email address using jQuery
- bind() vs live() vs delegate() function
- Avoid jQuery.Post(), use jQuery.ajax()
- Disable jQuery animation
- jQuery: Difference between eq() and get()
- Difference between $('div') and $('<div/>') in jQuery
- Keep your jQuery code clean
Feel free to contact me for any help related to jQuery, I will gladly help you.