jquery - What is this: $('<div />') -


in tutorial came across jquery:

var encodedname = $('<div />').text(name).html(); 

i havent seen '<div />' before. doesnt css selector. ideas?

this construction creates new jquery object contains 1 div element. can shorter though: $("<div>")


Comments

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -