Hi guys! Below are twelve of the jQuery related questions and answers on StackOverflow
that I found very useful during development. I opted to compile them here because I feel good reading those brilliant questions and answers by coders from around the world. Enjoy!
Sometimes you want some elements of your page to be visible, and if it is not visible, you want to tell the user about it. For example, a user must have a selection of data first before proceeding to new operation. If he has no selection (div is hidden), you can do a prompt that he must select something.
Ah, a drop-down list? Link # 2 above shows you how to get the user drop down list selection.
Teaches us how to select a child element and do it with faster performance (see the comment by Paul Irish).
I use return false;
when I want to prevent a page refresh after clicking a submit button and doing an AJAX request.
I use jQuery .closest() method on selecting an element within a table with several rows. I probably have to write an example in another blog post, ha!
This is how you will know if a user is a male or female, using jQuery!
If you’re more familiar with an element’s name or don’t want to add a class or id name, you can use this cool technique.
In some countries, Google’s domain name is banned. So if you are using a Google hosted jQuery library, you’re site won’t work. Link # 12 above shows you the fall back.
This can be the first part of the list, you can add more in the comments section below, or on our Facebook
And as always, thanks for reading!