简体   繁体   English

jquery.min.js用datepicker进行干扰

[英]jquery.min.js ineterferring with datepicker

I have some code that has a jquery datepicker and also some code for pagination. 我有一些带有jquery datepicker的代码,还有一些用于分页的代码。 Now my problem is when I add the following: 现在我的问题是当我添加以下内容时:

<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js'>

My date picker does not work. 我的日期选择器不起作用。

If I comment the above my pagination code does not work. 如果我在上面发表评论,则我的分页代码不起作用。 here is my jquery code code: 这是我的jQuery代码:

<link rel='stylesheet' href='http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css' />"
puts "<script src='http://code.jquery.com/jquery-1.8.2.js'></script>"
puts "<script src='http://code.jquery.com/ui/1.9.0/jquery-ui.js'></script>"
puts "<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js'></script>"

puts {
    <script type="text/javascript">
    jQuery(function() {
        jQuery( '#startdatepicker' ).datepicker();

    });

    </script>
}
puts {
    <script type="text/javascript">
    jQuery(function() {
        jQuery( '#enddatepicker' ).datepicker();

    });
    </script>
}
puts {
    <script type="text/javascript">
    jQuery(document).ready(function()
    {

    function Data_Load()
    {
    jQuery("#loading").fadeIn(900,0);
    #jQuery("#loading").html('<img src="bigLoader.gif" />');
    }

    function Hide_Load()
    {
    jQuery("#loading").fadeOut('slow');
    };


    jQuery("#pagination li:first")
    .css({'color' : '#FF0084'}).css({'border' : 'none'});
    Data_Load();
    jQuery("#jcontent").load("nbonbs_log.cgi?page=1", Hide_Load());


    jQuery("#pagination li").click(function(){
    Data_Load();

    jQuery("#pagination li")
    .css({'border' : 'solid #dddddd 1px'})
    .css({'color' : '#0063DC'});

    jQuery(this)
    .css({'color' : '#FF0084'})
    .css({'border' : 'none'});

    var pageNum = this.id;
    jQuery("#jcontent").load("nbonbs_log.cgi?page=" + pageNum, Hide_Load());
    });

    });
    </script>
}

Sometimes if you include the JQUERY library more than once it causes issues. 有时,如果多次包含JQUERY库,则会导致问题。 Maybe try commenting out the first JQUERY include (jquery-1.8.2.js). 也许尝试注释掉第一个JQUERY包含(jquery-1.8.2.js)。

Just a guess. 只是一个猜测。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM