jquery und prototype

2009-05-18 | 11:28 am | Kein Kommentar »

Problem: Namenskonflikt beim Shortcut $

Abhilfe: jQuery.noConflict()

Wichtig: Einbindung der Prototype Biliothek vor der jQuery Bibliothek.

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

    // Use jQuery with $j(...)
    $j(document).ready(function(){
       $j("div").hide();
     });

     // Use Prototype with $(...)
     $('someid').hide();
</script>

Links

Using jQuery with other Libraries

Sag etwas dazu: