admin管理员组

文章数量:1431726

I use this script:

$(document).ready(function() {

         $page = jQuery.url.attr("file");

         alert(page);


       });

but I get error jQuery.url is undefined and through firebug I was able to make sure that jquery.js is loaded

please advise

thanks

I use this script:

$(document).ready(function() {

         $page = jQuery.url.attr("file");

         alert(page);


       });

but I get error jQuery.url is undefined and through firebug I was able to make sure that jquery.js is loaded

please advise

thanks

Share Improve this question asked Mar 31, 2012 at 23:23 zaczac 4,95816 gold badges73 silver badges138 bronze badges 2
  • 3 You really shouldn't prefix your non-jQuery-object variables with $. It is ugly and will confuse people (including you, in the line after you did not add the $). Besides that, use var to avoid creating globals. – ThiefMaster Commented Mar 31, 2012 at 23:26
  • Thanks alot ThiefMaster I appreciate your advices and will do it – zac Commented Apr 1, 2012 at 1:39
Add a ment  | 

1 Answer 1

Reset to default 8

There is no built-in $.url function. You're missing the jQuery URL plugin.

本文标签: javascriptjQueryurl is undefinedStack Overflow