Broow Broow - 10 months ago 37
jQuery Question

What is the difference between these codes that gives the same output?

Maybe I lack of information on reading just wandering why code has different way of style but same output?. Can someone explain it to me?.

For example like this

--- The difference is the single and double quote.

--- Same again


it does not matter to use single or double quotes in above. but in case like creating dynamic html as an example :

var create_element = $("<div class='myclass'></div>"); 

you have to use both.

for more details about single or double quotes refer this link

for your second question, there isn't a difference of using true or disabled. but from jQuery1.6 and above, should usetrue`.