Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

Jenny Swift
Jenny Swift
21,999 Points

firebug tutorials for working with javascript

Hi, can anyone please recommend any good tutorials on how to use firebug when working with javascript, and also how to use firequery? There are no errors showing up but my code isn't working. I'm getting an idea of how to use firebug for fixing problems with css and html but I don't know how to with javascript. I'd like to be able to select an element and see what javascript is being applied to that element, like I can do with css. And I have firequery but I don't know how to use it.

2 Answers

You have to click on the console tab in order to type in javascript statements. If you have jQuery installed on the page you're working on, it's dead simple to select an element. Let's say you want to select the element with id="pnlText". All you have to type in the console is:

$("#pnlText");

however, if you do not have jQuery installed, you can do so by typing in:

document.getElementById("pnlText");

Here's a very good reference to the interchangeables between jQuery and pure JS http://youmightnotneedjquery.com/

You're very welcome Jenny.