Skip to content Skip to sidebar Skip to footer

Hash Sign In Jquery Calls

Being a pragmatic coder I tend to miss some obvious things and I wonder, What's the difference between $('loc') $('#loc') The more info the better about the ins and outs of #

Solution 1:

$('loc') is an element selector, looking for <loc> elements.

$('#loc') is an #id selector, looking for id="loc" elements.

Think CSS when looking at almost all jQuery selectors, they're very close if not identical in most cases.

Post a Comment for "Hash Sign In Jquery Calls"