1

I am using this code to pop-up a modal:

<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="/bootstrap.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
    $("#btn").click(function(){
        $('#myModal').modal('show');
    }); 
</script>

and also

<script src="https://code.jquery.com/jquery-1.4.4.1.min.js"></script>

loaded on same page without conflict.

bmm6o
  • 6,187
  • 3
  • 28
  • 55

1 Answers1

1

Try doing in this way. Load two versions of jQuery (not recommended). Then, restore jQuery's globally scoped variables to the first loaded jQuery.

    <!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>jQuery.noConflict demo</title>
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>

<div id="log">
  <h3>Before $.noConflict(true)</h3>
</div>
<script src="//code.jquery.com/jquery-1.6.2.js"></script>

<script>
var $log = $( "#log" );

$log.append( "2nd loaded jQuery version ($): " + $.fn.jquery + "<br>" );

// Restore globally scoped jQuery variables to the first version loaded
// (the newer version)

jq162 = jQuery.noConflict( true );

$log.append( "<h3>After $.noConflict(true)</h3>" );
$log.append( "1st loaded jQuery version ($): " + $.fn.jquery + "<br>" );
$log.append( "2nd loaded jQuery version (jq162): " + jq162.fn.jquery + "<br>" );
</script>

</body>
</html>
Deep Mehta
  • 1,250
  • 1
  • 16
  • 29
  • am tried it but no luck can you plz help me a more i want to load 1.4.41 first it is fro some other file but loaded into index.php and js 1.10.1 from other and i want it to second place plz alter ques code Thankyou! – user3450650 May 09 '14 at 19:34