mercredi 4 février 2015

Conflict b/w datepicker and autocomplete jquery


The below code works seperately in different php page. But when combining both in one page, nothing works. In firebug, the error says,



TypeError: $(...).datepicker is not a function

$("#test1").datepicker({


CODE FOR DATEPICKER



<link rel="stylesheet" href="css/date_pick/jquery-ui.css">
<script src="css/date_pick/jquery-1.10.2.js"></script>
<script src="css/date_pick/jquery-ui.js"></script>
<script type="text/javascript">

$(document).ready(function(){
$("#test1").datepicker({
changeMonth:true,
changeYear:true,
yearRange:"-35:+0",
dateFormat:"dd/mm/yy"
});
});

</script>
<input type="text" name="test1" id="test1" />


CODE FOR AUTOCOMPLETE



<link rel="stylesheet" href="lib/js/jquery.autocomplete.css">
<!-- jQuery & JS files -->
<script src="bootstrap/js/jquery.js"></script>
<script src="lib/js/jquery.autocomplete.js "></script>




Aucun commentaire:

Enregistrer un commentaire