Yes, I'm using Firebug on Firefox, but the Problem only shows up in Safari / IE.
Here is an example page: http://dev.rocho.org/nico-jquery You can click on the menu (Arbeiten, Vita, Kontakt) and the menu will expand. It should work in FF, but not in Safari / IE - why? It also works in Safari/IE when I use jQuery 1.2.3, but not with jQuery 1.2.5 and later. Jan On 18 Dez., 17:27, Ricardo Tomasi <ricardob...@gmail.com> wrote: > Try this: > > function menu_loader() > { > var speed = 200; > $("#menu ul").each(function(i){ > var $that = $('#menu ul:eq('+i+') > *:gt(0)'); > /* v1 - hide items if not active */ > $that.not('.active').hide(); > > $(this).attr('id', 'c' + i) > .children(":first").css({ cursor: 'pointer' }).end() > .click(function(){ > $('#c" + i + " li:gt(0)').toggle(speed); > $('#content').hide(); > }); > }); > }; > > 1. Are you using Firebug for debugging? > 2. Are you sure that selector returns an empty object? > 3. Could you post a test page? :) > > - ricardo > > On Dec 18, 11:50 am, "Jan Rocho" <jro...@gmail.com> wrote: > > > I have done some additional testing and I think this might be a jQuery > > bug which was introduced at v1.2.5. jQuery v1.2.4 was not released and > > the script works in all browsers up to jQuery 1.2.3. But one of my > > other scripts only works in jQuery 1.2.6, so I need that version. > > > On Thu, Dec 18, 2008 at 2:01 PM, DasJan <jro...@gmail.com> wrote: > > > Hi! > > > > I have the following code which, using jQuery 1.1.2 works in FF/Safari/ > > > IE: > > > > function menu_loader() > > > { > > > var speed = 200; > > > var item_title = new Array(); > > > var items = new Array(); > > > var i = 0; > > > $("#menu ul").each(function() > > > { > > > items[i] = $("#menu ul").eq(i).children().filter(function > > > (index) { return index > 0; }); > > > /* v1 - hide items if not active */ > > > if (items[i].is(".active") == false) { items[i].hide(); } > > > /* v2 - hide all */ > > > //items[i].hide(); > > > //apply the clicker > > > $(this).attr('id', 'c' + i); > > > $(this).children(":first").css({ cursor: 'pointer' }); > > > $(this).attr('onclick', "$('ul#c" + i + " li:gt(0)').toggle(" > > > + speed + ");$('#content').hide();"); > > > i++; > > > }); > > > } > > > > I just recently updated to jQuery 1.2.6 and the above code now only > > > works in FF, but not in Safari/IE/Chrome. > > > > I have a menu which is based on unordered lists, the first <li> is the > > > title of the menu which is always supposed to be displayed, the other > > > are only to be displayed when I click on the first IE. When I try this > > > in Safari/IE/Chrome and click on the visible LI, nothing happens. > > > > I also tried replacing the line with: > > > > $(this).attr('onclick', "$('ul#c" + i + " li:not(:first-child)').toggle > > > (" + speed + ");$('#content').hide();"); > > > > and > > > > $(this).attr('onclick', "$('ul#c" + i + " li').slice(1).toggle(" + > > > speed + ");$('#content').hide();"); > > > > Both of those also work in FF, but again not in Safari/IE/Chrome. > > > > Any ideas? > > > > Thanks, > > > Jan