Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. function youtubechannel_setvideo(href) {
  2.   youtubeid = href.replace("#","");
  3.   $('#youtubechannel-frame').attr('src','http://www.youtube.com/embed/' + youtubeid);
  4. }
  5.  
  6. Drupal.behaviors.youtubechannel = function(context) {
  7.   youtubechannel_setvideo($('#youtubechannel-list a:first').attr('href'));
  8.   $('#youtubechannel-list a').click(function(e) {
  9.     youtubechannel_setvideo($(this).attr('href'));
  10.     $(this.attr('class','active');
  11.     return false;
  12.   });
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement