forms - How to use 2 different versions of jquery in same html -


this question has answer here:

i want use both form validation datepicker in html. because of conflict not working. please help. here code.

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"                          type="text/javascript"></script>     <script     src="http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate.js"     type="text/javascript"></script>     <script type="text/javascript">       $().ready(function() {        $("#form1").validate({         rules: {             asset_name: 'required',             asset_code: 'required',             asset_desc: 'required',             purchase_date: 'required'              }         });        });          </script>        <link rel="stylesheet"      href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />        <script src="http://code.jquery.com/jquery-1.9.1.js"></script>         <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>         <link rel="stylesheet" href="/resources/demos/style.css" />        <script type="text/javascript">          jquery.noconflict();          $(function() {          $( "#purchase_date" ).datepicker({ dateformat: 'yy-mm-dd' });           });              $(function() {         $( "#renewal_date" ).datepicker({ dateformat: 'yy-mm-dd' });         })(jquery);             </script> 

you can use .noconflict() this

<!-- 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> 

see here


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -