Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript jQuery Basics (2014) Creating a Mobile Drop Down Menu Perform: Part 3

Jeremy Castanza
Jeremy Castanza
12,081 Points

Question about selected property for options.

In this video, we're using the following jQuery to change a Boolean property on the options elements:

$option.prop("selected", true);

While the code seems to work as intended, I like to check the DOM in Chrome Developer tools to see the change in code. In this case, I was hoping to see the "selected" property appearing in the option element in the DOM. However, this does not appear.

Is there a way to see Boolean properties (i.e. selected) for option elements in Chrome Developer tools?

EDIT: I figured out how to view the Properties. They're in the Properties tab. Please see follow up question below.

Thanks!

Jeremy Castanza
Jeremy Castanza
12,081 Points

I answered my own question in part... I noticed that there's a Properties tab that I can go glance at. Let me revise my question...

Is there a way to show the properties inline with the element in the DOM???

1 Answer

rydavim
rydavim
18,814 Points

In answer to your second question, not that I know of.

Including properties in the inspector would make it really difficult to navigate and read, which I think is why they don't do that. Unfortunately, it looks like they don't let you customize it even if you wanted to read it that way.

Sorry. :disappointed: