Multiple conflicts calling jquery fail

I am using jquery for two purposes. One for adding a calendar. another to switch between tags. But when combined, only 1 works. If I comment out the 1st script the second one works, and if I comment out the second script the first one works.

New update

Here's the script for the calendar.

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script>
$(function() {
$("#pickdate").datepicker({
buttonImage: 'images/date.jpg',
buttonImageOnly: true,
changeMonth: true,
changeYear: true,
showOn: 'both',
});
});
</script>

      

for this

  <div class="date">Due date  <input id="pickdate" type="text" placeholder="select" /></div>    

      

Here's a script to switch tabs.

<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.js"></script>
<script>
$(document).ready(function(){
$(".pro").click(function(){
$(this).addClass("selected").siblings().removeClass("selected");
});
});
</script>

      

for this

<ul class="promenu">
<li class="pro" > <a href="#">One-Time</a> </li>
<li class="pro selected" > <a href="#">Recurring</a> </li>
</ul>
.pro a{
display: block;
padding: 3px 20px;
text-decoration: none;
color: black;       
}
.selected{
background:#47ABCC;
}
.promenu .selected a{
color:#fff;
background:#47ABCC;
}

      

how to resolve this.?

+3


source to share


1 answer


You don't really need to include the jQuery link once per script tag, you only need to include it once.



So, in this case, I would say remove <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.js"></script>

and keep the link to version 1.10.2. You can also save a link to the jQuery UI.

+1


source







All Articles