Just starting using the Firebug console. I have a test script which I’ll post below. I open up the Firebug console and type $(“p”); this returns null. Its my understanding it should return all my p elements ie p, p.foo, p, p#bar. A conflict maybe or am I just using the console incorrectly?
<!DOCTYPE html>
<html>
<head>
<title>Testing jQuery</title>
</head>
<body>
<p>Hello World!</p>
<p class="foo">Another paragraph, but this one has a class.</p>
<p><span>This is a span inside a paragraph.</span></p>
<p id="bar">Paragraph with an id.
<span class="foo">And this sentence is in a span.</span>
</p>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript"
google.load("jquery", "1.4.2");
</script>
</body>
</html>
You’re using the console correctly. Even if jQuery can’t find any results, it should return an empty object, not null.
Could you console.log($); to see if jQuery is loaded?
That should result in the jQuery function being returned: