Typically you would use the one in quotes as that refers to an element within the page
<div id="myID"></div> - selector $("#myID");
<div class="foo"></div> - selector $(".foo");
when you see something like myID naked it is typically because it is a variable name, for instance
var myID = $("#myID");
Now if I need to use it again in a selector it would be;
$(myID);
Hope that helps!