Showing posts with label Magento. Show all posts
Showing posts with label Magento. Show all posts
Prototype and jQuery conflict issue in Magento?

Prototype and jQuery conflict issue in Magento?

<action method="addJs"><script>jquery/jquery-1.3.2.min.js</script></action>
<action method="addJs"><script>prototype/prototype.js</script></action>

Solution 1:

    var $j = jQuery.noConflict();

Solution 2:

    <script type="text/javascript">
      $.noConflict(); //Use no conflict here instead of js file
      // Code ........
      // Code ........
    </script>
   
Solution 3:

    $.noConflict();
    jQuery(document).ready(function(){
        jQuery("button").click(function(){
            jQuery("div").text("jQuery is still working!");
        });
    });
jquery conflict issue in Magento

jquery conflict issue in Magento

Solution 1 :

    var j = jQuery.noConflict();
   
    j( "div table" ).hide();
   
    $( "mytestid" ).style.display = "none";

Solution 2 :

    jQuery.noConflict();

    jQuery( "div table" ).hide();

    $( "mytestid" ).style.display = "none";

Solution 3 :

    jQuery.noConflict();
    (function( $ ) {
      $(function() {
        --------
        -------
        -----
      });
    })(jQuery);

Kategori

Kategori