Is there a way to somehow access YUI onload functionality?
I'm using embed.ly to auto-embed various media types on the forums, and for it to work I need to include embed.ly code in the header. That's no problem, but then I'd need to initialize embed.ly when the page has been loaded.
Currently I'm doing it with jQuery by adding the following in the end of headinclude template:
But since this is the only thing I'm using jQuery for and since YUI is used anyway, perhaps there would be a way to use YUI's onload functionality instead?
Thanks for any insights on this!
I'm using embed.ly to auto-embed various media types on the forums, and for it to work I need to include embed.ly code in the header. That's no problem, but then I'd need to initialize embed.ly when the page has been loaded.
Currently I'm doing it with jQuery by adding the following in the end of headinclude template:
Code:
<!-- BEGIN CUSTOMIZED --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script src="http://scripts.embed.ly/jquery.embedly.min.js"></script> <script type="text/javascript"> <!-- $('document').ready(function(){ $('div').embedly({ maxWidth: 400, maxHeight: 200, method: 'replace', wrapElement: 'div', className: 'embed', addImageStyles: true, cssSelector: 'a' }); }); // --> </script> <!-- END CUSTOMIZED -->
Thanks for any insights on this!