0

I saw something that I'd like to implement on my site - it's the counter at the top-right corner of the page here: http://newatlas.com/chainless-chopper-mc2-bike/50836/#p476587 that counts the image you're on as, you scroll the page.

I'm sure I can modify it to do what I want for my site, if I could just see the code these guys are using!

Anyone know how to use the debugger to study another developer's code?

Update

This question was marked as a duplicate of Find JavaScript function definition in Chrome, but that other question is not helpful in this case.

For one, the answers in that other question show you how to find a specific function name, but I don't know the name of the function that's registered as the listener.

For two, I don't think I should need to manually search the code in order to find the function. I'm sure there's a faster workflow for finding the code that's associated to an element's click event.

Kayce Basques
  • 23,849
  • 11
  • 86
  • 120
sashaikevich
  • 167
  • 13
  • This question should be reopened. There are faster workflows for solving this task than the [existing question / answers](https://stackoverflow.com/questions/9828876/find-javascript-function-definition-in-chrome) that's linked to. – Kayce Basques Aug 11 '17 at 23:04
  • @KayceBasques Than put an answer in that dupe.... – epascarello Aug 12 '17 at 00:30
  • The answer doesn't apply to the duplicate question. This question can (and should) actually be phrased differently. I'll edit it when I'm on a laptop... – Kayce Basques Aug 12 '17 at 00:46
  • @KayceBasques yeah, perhaps I didn't phrase it the best way... rephrase however you see it getting a better answer, and please share the faster workflow you mentioned above. I checked out @ epascarello's answer, but it didn't help me track down the code in this instance. I don't know if was just me, if it was devtools that let me down, or if it the site itself doing something funny with React. – sashaikevich Aug 12 '17 at 01:17
  • @epascarello I updated the question to explain why the other one is not helpful. – Kayce Basques Aug 14 '17 at 21:33
  • I'll be able to explain the faster workflow once this is re-opened. – Kayce Basques Aug 14 '17 at 21:33
  • @KayceBasques Thank you for the edit. You described the issue I had with it much better than how I had it. I ended up figuring out how to duplicate the behaviour I was looking for, and now my site has a similar counter, but I **definitely** want to learn your approach to a faster workflow. I'm hoping you'll be kind enough to share it. – sashaikevich Aug 20 '17 at 01:23

0 Answers0