0

How do I use the jQuery.noConflict(); with this?

 <meta charset="utf-8" />

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/redmond/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>

<script>
$(function() {
$( "#tabs1, #tabs2" ).tabs(
{
    show: function(event, ui){
        // check if is "mappanel" and "map" is empty
        if (ui.panel.id == 'mappanel' && $('#map').is(':empty'))
        {
            // load map
            var myOptions = {
                center: new google.maps.LatLng(-34.397, 150.644),
                zoom: 8,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };
            var map = new google.maps.Map(document.getElementById("map"), myOptions);      
collapsible: true       }
    }                    

});
});
</script>

I'm looking at this script and I've been trying a few different things...

<script src="prototype.js"></script>
   <script src="jquery.js"></script>
   <script>
     jQuery.noConflict();

     // Put all your code in your document ready area
     jQuery(document).ready(function($){
       // Do jQuery stuff using $
       $("div").hide();
     });

     // Use Prototype with $(...), etc.
     $('someid').hide();
   </script>
2
Contributors
5
Replies
17
Views
4 Years
Discussion Span
Last Post by radhakrishna.p
1

hai rexmatthew,

just suggestion only:

please try to do like as follows

change from this

 <script>
    jQuery.noConflict();
       // Put all your code in your document ready area
       jQuery(document).ready(function($){
            // Do jQuery stuff using $
          $("div").hide();
        });
     // Use Prototype with $(...), etc.
      $('someid').hide();
</script>

to this (we have to use the $.noConflict() this way i think )

 <script>
jQuery = $.noConflict();
    // Put all your code in your document ready area
   jQuery(document).ready(function(){        
        jQuery("div").hide();
   });
   // Use Prototype with $(...), etc.
  jQuery('someid').hide();
</script>

let me know the status

any comments are appreciated

Edited by radhakrishna.p: giving clarity on the solution

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.