0
votes

How can the two will run?.If I put first the datepicker the bxslider will not run and if the bxslider I put first the datepicker wil not run..thanks..

<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script>
$(function(){
    $( "#datepicker" ).datepicker();
    $("#icon").click(function() { 
        $("#datepicker").datepicker( "show" );
    })
});
</script>

<!-- bxslider -->
    <link href="bxslider/jquery.bxslider.css" rel="stylesheet" />
    <script src="bxslider/jquery.js"></script>
    <!-- bxSlider Javascript file -->
    <script src="bxslider/jquery.bxslider.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
      $('.bxslider').bxSlider({
        auto: true,
      });
    });
    </script>

How can the two will run?.If I put first the datepicker the bxslider will not run and if the bxslider I put first the datepicker wil not run..thanks..

2

2 Answers

0
votes

You're including jQuery twice. Don't do that; including jQuery a second time will overwrite the jQuery object and any plugins that have been attached to it. Include jQuery only once and then include your plugins.

0
votes
            <head>
            <link rel="stylesheet" type="text/css" media="screen" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/ui-lightness/jquery-ui.css" />
             </head>
             <body>
            <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
            <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
            <script src="js/jquery.bxslider.min.js"></script>

            <link href="css/jquery.bxslider.css" rel="stylesheet" />

            <script type="text/javascript">
            $(document).ready(function(){
            $('.bxslider').bxSlider();
            $('.datepicker').datepicker({
                    showOn: 'button',
                buttonImage: 'images/dp.png',
                buttonImageOnly: true,
                });
            });
            </script>   
            </body>