[英]Jquery.min.js local copy not calling window load function
I am using jquery for focus of tabs. 我正在使用jquery作为标签的焦点。 When i used :
当我使用时:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
in my jsp then the window.load function works good, but when i downloaded jquery.min.js and added in js folder. 在我的JSP中,然后window.load函数工作良好,但是当我下载jquery.min.js并添加到js文件夹中时。
<script type="text/javascript" src="jquery.min.js"></script>
like this. <script type="text/javascript" src="jquery.min.js"></script>
像这样。
Now window.load function is not working. 现在window.load功能不起作用。
<script type="text/javascript">
$(window).load(function() {
alert('Hello');
if($("#updatetemp").val()=="TRUE"){
$("#update_link").click();}
});
</script>
I found out the way to use JQuery locally.. 我找到了在本地使用JQuery的方法。
jQuery(window).bind("load", function($) {
var msgtemp= jQuery("#updatetemp").val();
if(msgtemp=="TRUE"){
jQuery("#update_link").click(function() {
}).click();
}
});
Instead if $ symbol i just used jQuery attribute and it worked. 相反,如果$符号我只是使用jQuery属性,它就可以工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.