Add title and description to youtubeplaylist jquery plugin
Posted on | September 28, 2010 | 2 Comments
I needed to use Dan’s youtubeplaylist jquery plugin for a work, but the client requested title and description fields below the player to users know more about what they’ll watch.
I’ve sent this patch to Dan Drayne, so he can include it in the next version. I’m attaching below the code I’ve done to add this feature.
<div id="yt_holder"> <ul class="ytmovie"> <li><a href="http://www.youtube.com/watch?v=QBBWKvY-VDc" ydesc="Description">Video 1</a></li> </ul> </div>
This is the HTML example. There is a new field named ydesc, so we can add some cool description. Now the CSS style for it.
#ytvideo #ytitle {
margin-top: 10px;
font-size: 14px;
color: #66CCFF;
font-weight: bold;
width: 420px;
}
#ytvideo #ydesc {
margin-top: 10px;
width: 420px;
}
And finally the youtubeplaylist patch that you can download here. Enjoy =)
Comments
2 Responses to “Add title and description to youtubeplaylist jquery plugin”
Leave a Reply


1128
21
3
0
0
1059
57
55
15
11
1
0
0
0
0
0
0
February 17th, 2011 @ 12:25 am
Thanks for your tip !
It’s exactly what i need to complete Dan’s plugin.
I think your forgot to show your new field in your html code.
How grab the original title and description of the video ?
February 17th, 2011 @ 11:12 am
Hi,
The html is added inside the javascript. Check out the patch.
Thank you.