2009/01/21

このサイトでは、jQuery Lightbox Plugin は"balupton edition"を入れているのですが、jQueryのバージョンを1.3に上げた途端、エラーが出る様になってしまいました。
調べた所、jQuery1.3ではSizzleという新しいセレクタが採用されており、以下の様な属性フィルタが動かない事が分かりました。
$('[@rel*=foo]')
さらに調べた所、どうやら"@"を付けている事自体が間違っているらしく"@"を取って $('[rel*=foo]')
としてやれば動く様になりました。なぜオリジナルの"@"付きのまま動いていたのかは分かりませんが...
本体への反映は以下
--- jquery.lightbox.js.orig 2008-09-12 02:46:50.000000000 +0900
+++ jquery.lightbox.js  2009-01-21 21:15:37.312500000 +0900
@@ -827,7 +827,7 @@
            var groups_n = 0;
            var orig_rel = this.rel;
            // Create the groups
-           $.each($('[@rel*='+orig_rel+']'), function(index, obj){
+           $.each($('[rel*='+orig_rel+']'), function(index, obj){
                // Get the group
                var rel = $(obj).attr('rel');
                // Are we really a group
ま、balupton edition使ってる人少ないかも知れませんが...
Posted at 21:22 | WriteBacks () | Edit
Edit this entry...

wikieditish message: Ready to edit this entry.






















A quick preview will be rendered here when you click "Preview" button.