1

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.

2
  • 1
    You're loading three different jQuery libraries? Why? Commented May 20, 2013 at 15:26
  • i dont know. this website is already using one JQUERY. i just add one contact jquery form Commented May 20, 2013 at 15:41

1 Answer 1

2

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/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.