Event affecting all items
I´m wondering why this jquery-code causes all list-items to receive my css.
This is my html source:
-
<body>
<ul>
<li id="eins">Test</li>
<ul>
<li>Test2</li>
<li>Test3</li>
</ul>
</ul>
</body>
And this is my jquery
-
$(document).ready(function() {
$("li#eins").css("cursor", "pointer");
$("ul").css("list-style-type", "none");
});
I only want to assign the css (cursor, pointer) to list item with id=eins.
In FF (2,3) it works.
But in IE (6,7) the css is assigned to all elements.
Why?