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



What is the difference between $('div') and $('<div/>') in jQuery?..

Answer / 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

More jQuery Interview Questions

Define slidetoggle() effect?

0 Answers  


Differentiate between calling stop (true, true) and finish method?

0 Answers  


What is cdn? Explain

0 Answers  


Which sign is used as a shortcut for jQuery?

0 Answers  


How to include jquery library in asp.net project?

0 Answers  






Explain .siblings() method in jquery?

0 Answers  


What is the use of jQuery.data() method?

0 Answers  


Different ways of using $.connect function in jquery?

0 Answers  


What does dollar sign ($) means in jQuery?

1 Answers  


What are the methods used to provide effects in jquery?

0 Answers  


What is the difference between .js and .min.js?

1 Answers  


What is a jquery library?

0 Answers  


Categories