#5006 closed bug (worksforme)
$('iframe').attr('src') != $('iframe')[0].src
Reported by: | cwolves | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | selector | Version: | 1.3.2 |
Keywords: | iframe src | Cc: | |
Blocked by: | Blocking: |
Description
Somewhat a weird bug, but if the src is 'http://www.google.com', one has a trailing slash, the other doesn't...
Worse, if the src is blank, src="", one has the src set to the parent root and the other doesn't (firefox)
The specific issue that I'm running into is this:
<iframe src="">
$('iframe').filter('[src=]') no results
FF 3.5.2
Change History (5)
comment:1 Changed 13 years ago by
comment:3 Changed 13 years ago by
Component: | unfiled → selector |
---|
comment:4 Changed 12 years ago by
Keywords: | iframe src added |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
For the two cases submitted, ie $('iframe').attr('src') != $('iframe')[0].src, these are both working fine in jQuery 1.4.3 as demonstrated here Live Test Case. This also demonstrates filter working fine when filtering by the src attribute. In addition, src="" will work fine as per here http://jsfiddle.net/addyosmani/BKZVG/2/ but you shouldn't be querying with [src=] if you're specifically looking for those elements with an empty-string src attribute.
comment:5 Changed 12 years ago by
This isn't fixed...
In your test case, one method has a trailing slash, the other doesn't. Also, please see the test case for empty src's:
I'm not sure what the correct behavior should be here, nor do I care any longer (15 month old ticket), but it's not fixed :)
MacOS Chrome & FF
Oh, the reason I referenced the DOM object is that .filter and .find seem to be getting results based on the DOM value whereas .attr('src') seems to be doing something else...