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>

Recommended Answers

All 5 Replies

I've really been finding this tricky...
Please help me :)

Oh, please disregard the map.

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

Thank you thank you thank you @radhakrishna.p

please mark this thread as solved if you got answer

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.