[CLOSED] Remove attributes from iframe
Posted: Thu May 01, 2014 3:33 am
I use fluidvids (http://toddmotto.com/fluid-and-responsi ... idvids-js/) to scale embedded YouTube movies in a responsive site.
The user copy-pastes You Tube's code
so also the attributes width, height and frameborder.
Fluidvids disposes of these attributes, yet my page does not validate: the frameborder attribute on the iframe element is obsolete.
How does this work?
When I inspect the source of the whole page in my browser I indeed find:
No wonder I get this validation error.
But when I select part of the page, including this movie and inspect the source of this selection I find:
The attributes are gone indeed.
Can anyone explain how this works?
And is there a way to get rid of these attributes completely (apart from not copy-paste them).
Frank
The user copy-pastes You Tube's code
Code: Select all
<__iframe src="http://www.youtube.com/embed/DZSn1Jl7eKo" frameborder="0" width="420" height="315"></__iframe>
Fluidvids disposes of these attributes, yet my page does not validate: the frameborder attribute on the iframe element is obsolete.
How does this work?
When I inspect the source of the whole page in my browser I indeed find:
Code: Select all
<__iframe src="http://www.youtube.com/embed/DZSn1Jl7eKo" frameborder="0" width="420" height="315"></__iframe>
But when I select part of the page, including this movie and inspect the source of this selection I find:
Code: Select all
<__iframe class=" fluidvids-elem" src="http://www.youtube.com/embed/DZSn1Jl7eKo"></__iframe>
Can anyone explain how this works?
And is there a way to get rid of these attributes completely (apart from not copy-paste them).
Frank