air
air

Reputation: 6264

jquery conflicting issue with multiple jquery adding

I have one website, every thing is working fine.

now I want to add one contactable Jquery form and when I add below code

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>

contact form work but other features of website like drop down stop working.

and when I remove above code every thing on website work fine expect this contact form.

I think there is conflict between jquerys, as I also have

<script type="text/javascript" src="<?=base_url();?>js/jquery-1.js"></script>
<script type="text/javascript" src="<?=base_url();?>js/jquery.js"></script>
<script type="text/javascript">jQuery(window).load(function(){jQuery('#slider').nivoSlider({effect:'fold',slices:15,boxCols:8,boxRows:8,animSpeed:500,pauseTime:5000,directionNav:true,directionNavHide:false,controlNav:false,captionOpacity:1});});</script>

any help how to make it working with both.

Upvotes: 1

Views: 65

Answers (1)

Dory Zidon
Dory Zidon

Reputation: 10719

If you must have two verisons of jQuery, you must use the jQuery noConflict.

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
  $.noConflict();
  // Code that uses other library's $ can follow here.
</script>

http://api.jquery.com/jQuery.noConflict/

http://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/

Upvotes: 2

Related Questions