JQuery Programmer Question:
What is the difference between $('div') and $('<div/>') in jQuery?

Answer:
$('<div/>') : This creates a new div element. However this is not added to DOM tree unless you don't append it to any DOM element.
$('div') : This selects all the div element present on the page.
$('div') : This selects all the div element present on the page.
Previous Question | Next Question |
What are selectors in jQuery and how many types of selectors are there? | How to disable jQuery animation? |