As of now on my results page there are ~20-30 embed elements:
<embed width=420 height=240 src=http://something.swf?foo=bar&baz
scale="noscale" type="application/x-shockwave">
I was thinking along the lines of something like defining an object and populating it as such:
window.videos = [];
<div class="video-1 video-">
<script>videos.append({ src:'blah', width:'blah', scale:'blah' })</script>
</div>
Then enumerate through videos
and .flash
each video when the modal opens using the respective object ( video-1 matches to videos[0] ) etc..
Though this is probably not ideal since I'm exposing the videos property to the global namespace.
An alternative could be storing the data inside of the element itself...
<div class="video" data="width=400&something=blah">
I might also even be able to just render the embed
element itself but not define a src
attribute and name it something like realsrc
, when the modal opens define src
property to realsrc
so it loads.
Would appreciate any tips...