|
|||
hi also ich komme einfach nicht klar. ich will es jetzt noch einmal mit jquery und lightbox versuchen. Ich habe hier eine deutsche Lösung zu meinem Problem gefunden:
jQuery Konflikt mit Lightbox / Thickbox dank prototype.js Der Lösungsvorschlag lautet: Zitat:
HTML-Code:
<script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.innerfade.js"></script> <script type="text/javascript"> jQuery.noConflict(); // Use jQuery via jQuery(...) jQuery(document).ready(function(){ jQuery("div").hide(); }); // Use Prototype with $(...), etc. $('someid').hide(); </script> <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="js/lightbox.js"></script> <script type="text/javascript"> $(document).ready( function(){ $('ul#portfolio').innerfade({ speed: 'slow', timeout: 6000, type: 'sequence', containerheight: '180px' }); }); </script> Das Ergebnis zeigt sich hier: Die Page wird nicht mehr geladen und die Fehlerkonsole spuckt Zitat:
Zitat:
Gruß ChOp Geändert von ChOpSueY! (13.11.2010 um 22:09 Uhr) |
Sponsored Links |
|
|||
Zitat:
Hm also das is meine innerfade... PHP-Code:
ich habe halt in $123 geändert. Soll ich die $ ganz weg lassen und nur 123 schreiben? Hatte ich auch schon versucht, da kommt der gleiche Fehler o_O |
|
|||
Nabend!
Also: Ob Du $123 oder 123 schreibst ist egal. Schätze Du musst die jQuery.noConflict(); anders definieren. So hab ich umgesetzt. Vorher: Code:
jQuery(document).ready(function() { var $ = jQuery; Code:
jQuery.noConflict(); jQuery(document).ready(function() { var $j = jQuery; Code:
jQuery(document).ready(function() { var $ = jQuery; Code:
jQuery.noConflict(); jQuery(document).ready(function() { var $j = jQuery; Referencing Magic - Shortcuts for jQuery If you don't like typing the full "jQuery" all the time, there are some alternative shortcuts: * Reassign jQuery to another shortcut o var $j = jQuery; o (This might be the best approach if you wish to use different libraries) * Use the following technique, which allows you to use $ inside of a block of code without permanently overwriting $: o (function($) { /* some code that uses $ */ })(jQuery) o Note: If you use this technique, you will not be able to use Prototype methods inside this capsuled function that expect $ to be Prototype's $, so you're making a choice to use only jQuery in that block. * Use the argument to the DOM ready event: o jQuery(function($) { /* some code that u |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
div Deklarationen funktionieren nicht zusammen | -DerLux- | CSS | 1 | 22.04.2011 16:58 |
Nicht alle Links funktionieren in Firefox | Stesifa | CSS | 5 | 09.06.2010 20:38 |
Effekte in der Navi funktionieren nicht... | Mthi77 | CSS | 1 | 06.12.2008 21:26 |
PNG Fixe funktionieren komischerweise nicht Lokal | human | CSS | 4 | 04.05.2007 21:57 |
XHTML und JavaScript funktionieren nicht zusammen?! | hyperterminal | (X)HTML | 2 | 22.08.2005 20:16 |