/    Sign up×
Community /Pin to ProfileBookmark

How to Troubleshoot Javascript Using Browser’s Inspector

Is there is a good way to use the inspector in a browser to pinpoint quickly where a javascript is applying a style, I can see a style changing from how it is set through css style sheets.

[This 24s video shows what I am seeing (link).](https://legacy-systems.biz/longview2500/public_links/public/programming/find_the_javascript/find_the_javascript.php)

[This is the link to the page shown in the video](https://legacy-systems.biz/longview2500/topics/virtual_data_rooms/books2smiles.inc/js_style_demo.html).

I have tinkered in the browser inspector to try finding a way to troubleshoot the javascripts, but have never figured out how to find the javascript that way. Up until now, I find the javascript by searching website files for the class or id of the element being styled.

![](https://legacy-systems.biz/longview2500/external_support/moxnix/inspector.png)

to post a comment
Full-stack DeveloperJavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@ellafellMay 05.2021 — 
  • - Open your page in Chrome.

  • - Turn on developer tools with F12 (Mac: Cmd+Opt+I).

  • - Select the Sources panel.


  • The toggler button opens the tab with files.

    Let’s click it and select hello.js in the tree view.

    **The Sources panel has 3 parts:**
  • 1. The File Navigator pane lists HTML, JavaScript, CSS, and other files, including images that are attached to the page. Chrome extensions may appear here too.

  • 2. The Code Editor pane shows the source code.

  • 3. The JavaScript Debugging pane is for debugging,
  • Copy linkTweet thisAlerts:
    @ivyhicksonMay 13.2021 — In any case thank you for helping me.
    ×

    Success!

    Help @carla_rogers spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 4.25,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...