• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to find javascript function, attached to button, with Chrome developer tool?

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm learning front-end design by finding features I like on certain websites, and trying to re-create them.  I'm trying to implement functionality similar to the following:

If I (1) got to the website, https://www.studiotime.io, (2) open chrome developer tool, and (3) toggle the device toolbar and shrink device width to <750 px, then there will be a magnifying glass (button) in the top right hand corner.  If you click the button, it opens a modal <div>.  I can see the document object being changed in elements panel of the developer tool, however I can't see the specific javascript code that is responsible for the update.

Is there a way I can view the javascript code so I can learn how this is done?

Thanks for the help!

Ranch Hand
Posts: 97
AngularJS Chrome Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it's possible with chrome developer tool.  Select the DOM element which you want to check the dom event listener and switch to event lister tab. you will get a list of events for the dom element.

Like here : https://developers.google.com/web/tools/chrome-devtools/console/images/events-eventlisteners_panel.png

Reference : https://developers.google.com/web/tools/chrome-devtools/console/events

Sorry, the link https://www.studiotime.io is unreachable!
    Bookmark Topic Watch Topic
  • New Topic