Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#228 closed bug (invalid)

different behavior for next() in IE and Firefox

Reported by: bap@… 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 (569 bytes) - added by bap@… 14 years ago.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by bap@…

Attachment: index.html added

comment:1 Changed 14 years ago by bap@…

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)

comment:2 Changed 14 years ago by anonymous

Resolution: invalid
Status: newclosed

when nesting the elements different behavior gets alike.

Note: See TracTickets for help on using tickets.