How to refer jquery library correctly. Please tell different option that how to refer jquery library correctly. I am suspecting problem in refering jquery library. If I put js file inline then it is working but at the same time if I refer it is not working.
rejoin2me
Member
31 Points
120 Posts
jScript debugger error , object expected
Feb 20, 2012 08:33 PM|LINK
I am getting jscript debugger error for the following code . What will be the posiible reasons.
<a href="http://jquery.com/">jQuery</a>
<script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript" language='JavaScript'>
$(document).ready(
function () {
$(
"a").click(function (event) {
alert(
"Thanks for visiting!");
});
});
</
script
>
MetalAsp.Net
All-Star
112752 Points
18373 Posts
Moderator
Re: jScript debugger error , object expected
Feb 20, 2012 08:42 PM|LINK
Shellymn
Contributor
2622 Points
485 Posts
Re: jScript debugger error , object expected
Feb 20, 2012 08:48 PM|LINK
It is working for me ... , Please put your <a> tag after the <script> and try ....
also try with this version of JQuery <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.1.min.js"></script>
rejoin2me
Member
31 Points
120 Posts
Re: jScript debugger error , object expected
Feb 21, 2012 05:42 PM|LINK
How to refer jquery library correctly. Please tell different option that how to refer jquery library correctly. I am suspecting problem in refering jquery library. If I put js file inline then it is working but at the same time if I refer it is not working.
me_ritz
Star
9339 Points
1448 Posts
Re: jScript debugger error , object expected
Feb 21, 2012 05:55 PM|LINK
Copy, paste and test: --------------------------- <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script type="text/javascript" language='JavaScript'> $(document).ready(function () { $("a").click(function () { alert("Thanks for visiting!"); }); }); </script> </head> <body> <a href="http://jquery.com">jQuery</a> <div>a</div> </body> </html>rejoin2me
Member
31 Points
120 Posts
Re: jScript debugger error , object expected
Feb 21, 2012 07:27 PM|LINK
Thanks
For me the problem is ,below line is not working correctly, What's wrong in this.
<
script type='text/javascript' language='JavaScript' src='<%= Page.ResolveUrl("~/Scripts/Landing.js") %>'></script
>
my actual website url is
http://localhost/Csws.UI/General/Landing.aspx
me_ritz
Star
9339 Points
1448 Posts
Re: jScript debugger error , object expected
Feb 21, 2012 07:32 PM|LINK
Solved thread:
http://forums.asp.net/t/1488825.aspx/1
rejoin2me
Member
31 Points
120 Posts
Re: jScript debugger error , object expected
Feb 21, 2012 08:44 PM|LINK
If i do inline code then both javascript and jquery working, but If I refer by doing src= , then it is not working.