0

I use a template html with some javascript function but don't know where the javascript is handled.

Please, help me.

<onclick="moveIconClick()"></> (I can see it runs but don't know where is this function)

thanks, I've searched this function in javascript file and found this.

3
  • 2
    just search the function name "moveIconClick" in all js files. Commented Nov 5, 2014 at 8:38
  • it might be in an External JS Commented Nov 5, 2014 at 8:38
  • If you know the function name, and just want to find where it is defined, then you could search through sources in devtools as @Tyler.z.yang suggested, but you also certainly have the ability in your editor or IDE to search through multiple files. Commented Nov 5, 2014 at 8:46

4 Answers 4

2

Use this short cut can help find out string in your chrome

in windows:

Ctrl + Shift + F

or in mac:

CMD + Option + F

Then enter moveIconClick will help you.

Here is a related answer: "How to search all loaded scripts in Chrome Developer Tools?" The last answer. : )

Sign up to request clarification or add additional context in comments.

12 Comments

Can I know why down me ?
It finds string not functions
Then you will get where is your functoin. I used to use this to find my orther guy's function. And it works! @reenleedr
Okey chill.. I know it works.. but it doesnot find functions it find words
My fault. I will change my answer. @reenleedr
|
1

This may not be seen as answer but this is what you want to know:

You need to see the sourcecode of the page. The function might be written directly in html page or might be imported from another js file which is normally done in head part of the page.

Read more about "how to use js in html"

2 Comments

concede that this is indeed a good answer. Apologies have deleted my comment.
@TomRedfern haha not a problem man
0

For debugging purposes, you can use Chrome console and print what you need on it. Also if you go to resources, you can find scripts that are currently used on that template.

Comments

0

If you are using chrome press Ctrl + Shift + i then in web inspector press Ctrl + Shift + i. Search moveIconClick, will display results. Hitting Esc will close search console. OR in Any browser right click and select "Inspect element" will give you web inspector. There you can search any text. If you want to debug the event you can put breakpoints in 'Sources' tab of inspetor.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.