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”

  1. Hervé
    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 ?

  2. Marco
    February 17th, 2011 @ 11:12 am

    Hi,

    The html is added inside the javascript. Check out the patch.

    Thank you.

Leave a Reply







Who Am I ?

I'm Marco Rodrigues and I currently work in Luxembourg as System Administrator.

Contact me.








Subscribe to my feed

Search

    Writing

    26 articles
    1176 comments

      Comments

      platforms
      windows 1128
      linux 21
      macos 3
      sun 0
      wp 0

      browsers
      ie 1059 
      firefox 57 
      opera 55 
      safari 15 
      chrome 11 
      epiphany 1 
      bonecho 0 
      flock 0 
      konqueror 0 
      iceweasel 0 
      lynx 0 
      netnewswire 0