#228 closed bug (invalid)
different behavior for next() in IE and Firefox
Reported by: | 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)
Change History (3)
Changed 17 years ago by
Attachment: | index.html added |
---|
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
when nesting the elements different behavior gets alike.
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)