简体   繁体   中英

jquery.min.js ineterferring with datepicker

I have some code that has a jquery datepicker and also some code for pagination. 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:

<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. Maybe try commenting out the first JQUERY include (jquery-1.8.2.js).

Just a guess.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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