Reputation: 57
I am using two different scripts on one page and when I call them both, one of them doesn't work. If I delete one then the one left works. Why aren't they both working? Here is what I have in the head of my page:
<script type="text/javascript" src="jscript/jquery.js"></script>
<script type="text/javascript" src="jscript/script.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="../plugins/nicescroll/jquery.nicescroll.min.js"></script>
<script>
$(document).ready(function () {
var nice = $("html").niceScroll();
$("#outer").html($("#outer").html());
$(".overflow").niceScroll({
cursorborder: "",
cursorcolor: "#333333",
boxzoom: false,
cursorwidth: "5px"
});
});
</script>
<script type="text/javascript" src="tabslider/javascripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="tabslider/javascripts/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="tabslider/javascripts/jquery.coda-slider-2.0.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#coda-slider-1').codaSlider();
});
</script>
Posted code on PasteBin: http://pastebin.com/MwNTNhXV
Upvotes: 2
Views: 918
Reputation: 15338
your script should look like :
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="jscript/script.js"></script>
<script type="text/javascript" src="../plugins/nicescroll/jquery.nicescroll.min.js"></script>
<script type="text/javascript" src="tabslider/javascripts/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="tabslider/javascripts/jquery.coda-slider-2.0.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var nice = $("html").niceScroll();
$("#outer").html($("#outer").html());
$(".overflow").niceScroll({cursorborder:"",cursorcolor:"#333333",boxzoom:false,cursorwidth:"5px"});
$('#coda-slider-1').codaSlider();
});
</script>
the issue is that you're loading 3 jQuery versions and the order of other script is not right
Upvotes: 4