jQuery: hard time to get <embed> element
Posted
by Patrick
on Stack Overflow
See other posts from Stack Overflow
or by Patrick
Published on 2010-04-15T12:46:21Z
Indexed on
2010/04/15
12:53 UTC
Read the original article
Hit count: 329
hi,
how can I get the embed element with jQuery ? (I spent enough time trying with "children(), find(), last() jquery functions).
This is my code. Until here it works, I would like to get the second children (embed).
$('div.filefield-file').each(function(index) {
console.log($(this).children());
});
</script>
This is HTML code:
Scheduling Video <div class="field-item even">
<div class="filefield-file clear-block"><div class="filefield-icon field-icon-video-x-flv"><img class="field-icon-video-x-flv" alt="video/x-flv icon" src="http://localhost/drupal/sites/all/modules/filefield/icons/protocons/16x16/mimetypes/video-x-generic.png"></div><div style="background-color: rgb(255, 255, 255); width: 400px;"><embed style="display: block;" src="/drupal/videoPlayer.swf?file=http://localhost/drupal/sites/default/files/files/projects/Project3/videos/screenshot.flv" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" bgcolor="#ffffff" allowfullscreen="true" autoplay="true" flashvars="file=http://localhost/drupal/sites/default/files/files/projects/Project3/videos/screenshot.flv" height="400" width="400"><div>screenshot.flv</div></div></div> </div>
© Stack Overflow or respective owner