Organizing multiple embed codes with jQuery
Posted
by Nimbuz
on Stack Overflow
See other posts from Stack Overflow
or by Nimbuz
Published on 2010-04-26T07:11:17Z
Indexed on
2010/04/26
7:13 UTC
Read the original article
Hit count: 279
I have several embed codes on my website, for example:
Embed Code #1:
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/f8Lp2ssd5A9ErAc&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/f8Lp2A9ErAc&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
Embed Code #2:
<script type="text/javascript">
_qoptions={
qacct:"p-3asdb5E0g6"
};
</script>
<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
<noscript>
<a href="http://www.quantcast.com/p-3asdb5E0g6" target="_blank"><img src="http://pixel.quantserve.com/pixel/p-3asdb5E0g6.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/></a>
</noscript>
and so on..
How do organize them and separate them into an external single js file to keep the markup clean?
Thanks for your help!
© Stack Overflow or respective owner