jQuery vs. Mootools und andere Frameworks

TomatoCart mit jQuery und MooTools

© jQuery.com – http://jquery.com/

jQuery vs MooToolsMooToolsjQueryMootoolsjQueryCommerceTomatoCart($)MooTools
<script type="text/javascript" src="other_lib.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
jQuery.noConflict();
</script>

Möglichkeit 1

<script type="text/javascript">
jQuery(document).ready(function(){
//Hier folgen, wie gewohnt die jQuery-Anweisungen
};
</script>

Möglichkeit 2


<script type="text/javascript" src="other_lib.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$.noConflict();
jQuery(document).ready(function($) {
// Hier folgt der jQuery-Code mit der $-Anweisung
});
// Hier folgt der Code anderer JavaScript Frameworks.
</script>

Möglichkeit 3


<script type="text/javascript" src="other_lib.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
var $j = jQuery.noConflict();
$j(document).ready(function(){
//Hier folgen, wie gewohnt die jQuery-Anweisungen.
};
</script>

Google+

Michael Brückner Michael Brückner

wallpaper-1019588
Die richtige Matratze für erholsamen Schlaf
wallpaper-1019588
Die 4 Schlüssel der Langlebigkeit: So steuerst du dein biologisches Alter wirklich
wallpaper-1019588
Die Simpsons und der Mythos der Zukunfts-Vorhersagen
wallpaper-1019588
Chinas Angriff auf die Wärmepumpe: Droht das Aus für deutsche Hersteller?
wallpaper-1019588
Deine digitale Festung: App-Berechtigungen sinnvoll einstellen und deine Privatsphäre schützen