r1492 - trunk/demos

r1492 - trunk/demos


Author: pazu2k@gmail.com
Date: Sat Jan 3 06:24:57 2009
New Revision: 1492
Modified:
trunk/demos/index.html
Log:
demos/index.html - replaced the $= attribute selector with an if condition
for now to overcome the selector bug in 1.3.
Modified: trunk/demos/index.html
==============================================================================
--- trunk/demos/index.html    (original)
+++ trunk/demos/index.html    Sat Jan 3 06:24:57 2009
@@ -122,10 +122,12 @@
                            if (window.location.hash) {
                                var demo = window.location.hash.split('|')[1];
-                                $('#demo-config-menu a[href$="'+ demo +'.html"]').each(function(){
-                                    $(this).parents('ul').find('li').removeClass('demo-config-on');
-                                    $(this).parent().addClass('demo-config-on');                                    
-                                    loadDemo(this.href);
+                                $('#demo-config-menu a').each(function(){
+                                    if (this.href.indexOf(demo + '.html') !== -1) {
+                                        $(this).parents('ul').find('li').removeClass('demo-config-on');
+                                        $(this).parent().addClass('demo-config-on');                                    
+                                        loadDemo(this.href);                                        
+                                    }
                                });
                            }