1

i m working on a website which uses an old version of Jquery (1.4.4), i can t update this version. I want to add Twitter Bootstrap plugins. How can i use jquery no conflict with these plugins because they are interfering with others functions of the website using Jquery 1.4? The pattern of bootstrap plugins is like this :

!function($) {
  // code here

  // plugin definition here

} ( window.jQuery);

Maybe like this ? :

<script type="text/javascript" src="/js/jquery.min17.js"></script>

     <script>
     var jq17 = jQuery.noConflict();
     </script> 

     <script type="text/javascript" src="/js/bootstrap-tab.js "></script> 

1 Answer 1

4

It's quite simple

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script>
    var $ = jQuery.noConflict();
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
    var jq17 = jQuery.noConflict();
</script>

Live Example: http://jsbin.com/elomit/edit#javascript,html,live

1
  • In which file those lines should be added to?
    – user938363
    Commented May 10, 2013 at 21:32

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.