Skip to main content

Bug Tracker

Side navigation

#228 closed bug (invalid)

Opened October 03, 2006 08:51AM UTC

Closed October 03, 2006 06:58PM UTC

Last modified June 21, 2007 03:00AM UTC

different behavior for next() in IE and Firefox

Reported by: bap@allseas.com Owned by: ??
Priority: major Milestone: 1.0
Component: core Version: 1.0
Keywords: next() Cc:
Blocked by: Blocking:
Description

When using this code:

<html>

<head>

<title>A Tree</title>

<script src='jQuery.js'> </script>

<script>

var mustHide = false;

function showHide(element)

{

if(mustHide) {

$(element).next().hide();

} else {

$(element).next().show();

}

mustHide = ! mustHide;

}

</script>

</head>

<body>

<ul>

<li>Een</li>

<li onclick='showHide(this)'>Twee</li>

<ul>

<li>A</li>

<li>B</li>

<li>C</li>

</ul>

<li>Drie</li>

<ul>

<li>D</li>

<li>E</li>

</ul>

</ul>

</body>

</html>

In IE when clicking Twee (Dutch for Two) Drie (Dutch for Three) and sibblings dissapear, in FireFox the A, B, C part dissapears.

I'm more happy with the FireFox behavior.....

Attachments (1)
  • index.html (0.6 KB) - added by bap@allseas.com October 03, 2006 08:57AM UTC.
Change History (2)

Changed October 03, 2006 09:09AM UTC by bap@allseas. comment:1

When looked closer, the problem seems in the scope of the onclick event.

In FireFox, it can be activated on <li ...>Twee</li>, in IE the whole <ul>...</ul> after Twee can be clicked aswell. (And then it sounds quite logical Drie gets hidden/Shown)

Changed October 03, 2006 06:58PM UTC by anonymous comment:2

resolution: → invalid
status: newclosed

when nesting the elements different behavior gets alike.