Ticket #11424 (closed bug: invalid)
$('.class') vs jQuery('.class') one returns null, the second returns the correct element
|Reported by:||sm1215||Owned by:|
Summary explains it all, it was my understanding $ was a valid shortcut for jQuery, but this has had me stumped for some time. I only substituted jQuery in out of desperation. I am still fairly new to jQuery so if this is not the case, then please disregard this message. Here is my code:
Doesn't work var $des = $('.description'); var $des = jQuery('.description'); console.log($des);
My description class is inside a div, nested in a list, so maybe that could have been causing some problems? It just seemed strange to me that one method works and the other doesn't. Anyways, as I've said, I'm still relatively new, so there may be something I have missed. Thought it was worth mentioning though.