While implementing Interface Sliders, I learned that under IE6/7 jQuery
1.1.1's ID selector ($('#uniqueID')) will return either an element with
ID of "uniqueID" or an element with a NAME of "uniqueID" -- whichever
comes first.
Firefox in unaffected, returning ONLY the element with ID of "uniqueID"
(if found) -- the expected behavior.
This looks to be a reported; http://dev.jquery.com/ticket/951 although
the ticket incorrectly limits the scope to anchor tags. Here is an
example using <input>;
---
<form>
<input type="hidden" id="vmps" name="mps"></input>
<div id="mps"></div>
</form>
<script type="text/javascript">
$().ready(function(){
$('#mps').append('#mps selector worked <br />');
$('form div').append('form>div selector worked <br />');
});
</script>
---
This will result in a script error in IE, as you can't call $.append()
on an input.
The point is; it should be calling $.append on <div id="mps"> ... (as FF
& Opera do).
~ Brice
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/