html - javascript scrolling youtube player, modifying divs -
this first post on here, i've found site extremely helpful in past, go-to when google search.
i run how-to youtube channel. i've finished building webpages , ready go online, need have descriptions along each video appear clicked. i'm using this responsive player, i've been trying modify html , divs there description appears right of each video, thumbnails below it. tried using getelementsbyids instead of getelementbyid, broke (unless didn't right), deleted , tried using getelementbyid tag. experimented separate video demo working.
this did. did mimic divs "vid-container" div , renamed "vid-desc-container", placed directly below "vid-container" div in html code. made new divs similar properties except placement. result? worked, second video div directly below first. if can placement on right (2/3 size of video, above scrolling thumbnails) can put description in instead. apologize if html isn't legible, tried wouldn't paste post without breaking.
the demo set adjust screen width , scale down mobile platforms, disabled , i'll redirecting mobile version of site won't have description.
i put edited html file demo (demo in link above) in dropbox. if replace html file 1 have in [this dropbox link][2] you'll see how modified it. keep trying paste code original post cutting off parts.
this added in
<div class="vid-desc-container"><iframe width="560" height="315" id="vid_desc" src="demo%20responsive%20youtube%20player%20with%20scrolling%20thumbnail%20playlist_files/eg6knojmzky.htm"
frameborder="0">
i added css, played around "left" , couldn't position wanted.
.vid-desc-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%;
and modified first vid-item div have 2 "getelementbyid"s instead of one.
<div class="vid-item" onclick="document.getelementbyid('vid_frame').src='http://youtube.com/embed/eg6knojmzky?autoplay=1&rel=0&showinfo=0&autohide=1',
document.getelementbyid('vid_desc').src='http://youtube.com/embed/eg6knojmzky?autoplay=1&rel=0&showinfo=0&autohide=1'">
i apologize html isn't pasting in properly. guess need more 10 reputation points post second link, here in href
<a href="https://www.dropbox.com/s/4q3w36y27j8c9b5/demo%20responsive%20youtube%20player%20with%20scrolling%20thumbnail%20playlist.htm?dl=0">dropbox link</a>
Comments
Post a Comment