Modify ↓
Ticket #2706 (closed bug: fixed)
$("iframe").contents().width() throws exception
| Reported by: | telega | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.2.4 |
| Component: | attributes | Version: | 1.2.3 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Code $("iframe").contents().width() throws exception in Opera & Firefox and returns NaN in IE.
<script src="jquery.js"></script>
<script>
$(document).ready(function() {
try {
var width = $("iframe").contents().width();
alert(width);
}
catch(e) { alert(e); }
});
</script>
<iframe></iframe>
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Tested in all offending browsers listed above - this issue no longer exists:
http://jsfiddle.net/rwaldron/hqA8u/