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

Can we have multiple document.ready() function on the same page?

1 Answers  


What is the difference between size and length of jQuery?

1 Answers  


Which is the latest version of jQuery library?

1 Answers  


Difference between document.ready and window.onload? : jQuery Mobile

1 Answers  


What is the difference between bind() and live() function in jquery?

1 Answers  


What is the difference between find and children methods in jquery?

1 Answers  


What are the difference between alert() and confirm()?

1 Answers  


List browser related issues for jquery?

1 Answers  


Define url paremeter of jquery ajax method?

1 Answers  


Explain the difference between javascript and jquery? : jquery mobile

1 Answers  


What features of jquery, has been used in web applications?

1 Answers  


Can there be more than one ready function in jquery?

1 Answers  


Categories