user3145460 user3145460 - 26 days ago 8
jQuery Question

jQuery functionality

I have implemented one function by using this:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>


At the same time header file have jquery function. When I using

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>


the header file function is not working.

If I remove this header is working well. but the page function is not working.
How can I resolve this issue?

Script:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.min.js">\x3C/script>')</script>
<script defer src="<?php echo base_url(); ?>js/jquery.flexslider.js"></script>
<script src="<?php echo base_url(); ?>js/responsiveslides.min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(window).load(function() {
jQuery(".slides").responsiveSlides({
auto: true,
pager: false,
nav: true,
controlNav: "thumbnails",
speed: 500,
namespace: "flexslider",
before: function () {
jQuery('.events').append("<li>before event fired.</li>");
},
after: function () {
jQuery('.events').append("<li>after event fired.</li>");
}
});
});
</script>


In header on this page the countries name will be display in drop down by using js.

Answer Source

I've had similar issues in the past and resolved it by changing the load order of the jquery libraries.