How do I see what JS is changing style to my elements in Chrome dev tools or Firefox dev tools?

Andrea

My is a noob question as I am just learning JS so I am not good at it yet.

I am currently building a website ad added some JS snippets to do few actions. Now my footer has opacity: 0 and it doesn't come from CSS, therefore must come from some JS, but I cannot find it. How do I find what JS is modifying the style of a specific HTML element in the Chrome or Firefox DevTools?

Here is a screenshot to show the code: https://imgur.com/iYIeSPO

I checked all my JS files but couldn't find anything that gives my footer opacity:0.

Sebastian Zartner

The Chrome DevTools allow you to stop at a specific change in the DOM structure.

To do that right click the element and choose Break on > attribute modifications from the context menu.

Break on attribute modifications

Then, once the style attribute is added (may require a page reload), the script execution will stop at the JavaScript line where the change occurred.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to see #document-fragment in the Elements page in Chrome dev tools?

Why cant i see file_get_contents request in firefox and chrome dev tools under network activity?

Why can't I see my Indexed DB in Firefox dev tools?

How to make chrome dev-tools see custom object properties

Chrome dev tools: How to see attached event listeners for an HTML element

See exact CSS specificity in Chrome Dev Tools?

How to turn off the new size indicator for elements on Chrome dev tools?

What should I do if I want to click button on the new page while running snippet on chrome dev tools

Horizontal scrolling in Chrome Dev Tools elements inspector?

Chrome Dev Tools export Elements HTML

Split the "Elements" tab and the "Console" in Chrome dev Tools

How do you set hover using Chrome Dev Tools on pseudo elements?

Websockets and Chrome Dev Tools

Chrome Dev Tools is blank

What is "Unregister service workers" in Chrome dev tools?

How do I set Firefox Dev Tools to respect source maps in the console?

Do Chrome Dev Tools support flexbox CSS?

Disable a Single JS Script in Chrome Dev Tools

Chrome dev tools crashing when debugging JS

How to change color format in Firefox Dev Tools?

How do I stop chrome dev tools from resizing things to fit in the window?

How Chrome dev tools shows cookies

How to return to current position in Chrome Dev Tools?

How to disable chrome dev tools waterfall?

Firefox Dev Tools: Is it possible to see event listeners on document?

How do I change dev tools console scope to be local to a function?

How do I load NPM packages in browser dev tools console?

Can't see watch expression in Chrome dev tools with import module

How can I force all HTML elements with inline style or a class with display:none to be visible for debugging using Dev Tools