What is the difference between $('div') and $('<div/>') in jQuery?
Answer Posted / chaitanya
$('<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.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain all the ways to include jquery in a page?
Can you please explain the difference between javascript and jquery? : jquery mobile
How to always reference latest version of jquery?
Explain jquery connect?
Differentiate between width() vs css(‘width’) in jquery
How to disable/enable an element with jQuery?
Explain cdn? : jquery mobile
What are the types of selectors in jQuery?
What is the use of jQuery load method?
Why are not some scripts and styles loading? : jquery mobile
What are the differences between size and length in jquery?
How to concatenate two strings using jquery?
How can an element be checked if it contains a specific class?
What are the different types of selectors in jquery?
How can we show and hide an element via jquery?