tags:

views:

21

answers:

0

Hello all,

I have read http://stackoverflow.com/questions/3279976/how-to-know-where-javascript-method-is-defined-and-which-method-is-called-using-f

and tried all mentioned methods.

Still I could not find a method work for me.

Basically, I just need to track down where a javascript function is defined? I have used the latest alpha version 1.6 of firebug but it still cannot help me find the definition.

Thank you

/* the test HTML */
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Untitled Form</title>
<link rel="stylesheet" type="text/css" href="view.css" media="all">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"&gt; </script>
<script type="text/javascript" src="test.js"></script>

</head>
<body id="main_body" >

        For example, consider the HTML:
<div id="target">  Click here</div>
<div id="other">  Trigger the handler</div>
    </body>
</html>

/* view.js */
$(document).ready( function () {
$('#target').click(function() {
  alert('Handler for .click() called.');
});
});