This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Javascript for displaying most recent Vimeo video

By: a guest on Mar 26th, 2012  |  syntax: None  |  size: 0.82 KB  |  views: 319  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
  2. <script type="text/javascript">
  3. $(function() {
  4.         $.getJSON('http://vimeo.com/api/v2/your-user-name/videos.json?callback=?', {format: "json"}, function(videoList) {
  5.                 $.getJSON('http://vimeo.com/api/oembed.json?url=http%3A//vimeo.com/' + videoList[0].id + '&byline=false&portrait=false&callback=?', {format: "json"}, function(videoProperties) {
  6.                         document.getElementById("vimeoRecent").innerHTML=videoProperties.html
  7.                         document.getElementById("vimeoDescription").innerHTML="<p><a href='" + videoList[0].url + "'>" + videoProperties.title + "</a> from <a href='" + videoProperties.author_url + "'>" + videoProperties.author_name + "</a> on <a href='http://vimeo.com'>Vimeo</a>.</p><p>" + videoProperties.description + "</p>"
  8.                 });
  9.         });
  10. });
  11. </script>
clone this paste RAW Paste Data