Just a quick note to myself and those who might find this useful. While using firebug console to debug jQuery, make sure that $ is in fact representing jQuery, since the $ alias might be tied to other things.
Hopefully, the following screenshot explains what I’m talking about. As you can see, the $ alias is currently not representing jQuery.
As shown above, there are basically 4 ways that I know off which you can test this in your firebug console.
$
jQuery
window.$
jQuery === $
Usually, what you would want is that all of the 4 tests above return function() when debugging jQuery.
If $ is currently not representing jQuery, even the simplest test on selectors such as $(‘div’) will fail (return null to be exact).
You can of course overwrite this by doing $ = jQuery. Or a better way is to use jQuery(…) instead of $(…) while writing your statements in the console.
Leave a Reply