Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use different versions of Jquery on a single page

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 192
    Comment on it

    If you calling the different versions of Jquery then your code can clash the mutual variables. To use each of the Jquery versions separately you have to use " jQuery.noConflict()"

    Consider the links with multiple Jquery versions below:-

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
    <script>
        var $i = jQuery.noConflict();
        alert($i.fn.jquery);
    </script> 
    
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script>
        var $j = jQuery.noConflict();
        alert($j.fn.jquery);
    </script> 
    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script>
        var $k = jQuery.noConflict();
        alert($k.fn.jquery);
    </script> 
    

    So by this way you can have as much as versions of Jquery that you need.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: