Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am using some jquery files for auto complete and datetime picker control but 3 files among them are conflicting:

  1. Two files for autocomplete are

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>  
    
  2. One file for Calender datetime picker is:

    <script  src="../assets/js/jquery-1.8.3.min.js"></script> 
    

These 3 files are confilicting when i comment date time picker file autocomplete works and if I uncomment it autocomplete stops.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
147 views
Welcome To Ask or Share your Answers For Others

1 Answer

If you want to include both the js files you can..

 <!-- load jQuery 1_8_3 -->
    <script  src="../assets/js/jquery-1.8.3.min.js"></script> 
    <script type="text/javascript">
    var jQuery_1_8_3 = $.noConflict(true);
    </script>

    <!-- load jQuery 1.4.2 -->
    <script type="text/javascript" src="jquery/jquery-1.4.2.js"></script>
    <script type="text/javascript">
    var jQuery_1_4_2= $.noConflict(true);
    </script>

Its better to avoid multiple versions in the page..and its better to use appropriate jquery-UI Version with the jquery version


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...