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

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -