Guest User

Untitled

a guest
May 1st, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. dom.videoLinks.click((e) => {
  2. e.preventDefault();
  3. console.log($(this));
  4. var self = $(this),
  5. url = self.attr(configuration.attribute);
  6.  
  7. eventHandlers.showVideo(url);
  8.  
  9. // Deactivate any active video thumbs
  10. dom.videoLinks.filter('.video-selected').removeClass('video-selected');
  11.  
  12. // Activate selected video thumb
  13. self.addClass('video-selected');
  14. });
  15.  
  16. dom.videoLinks.click(function(e) {
  17. e.preventDefault();
  18. console.log(this);
  19. console.log($(this));
  20. var self = e.this,
  21. url = self.attr(configuration.attribute);
  22.  
  23. eventHandlers.showVideo(url);
  24.  
  25. // Deactivate any active video thumbs
  26. dom.videoLinks.filter('.video-selected').removeClass('video-selected');
  27.  
  28. // Activate selected video thumb
  29. self.addClass('video-selected');
  30. });
  31.  
  32. obj.method = function(){
  33. console.log(this);
  34. $('a').click(e=>{
  35. console.log(this);
  36. })
  37. };
  38. obj.method(); // logs obj
  39. $('a').click(); // logs obj
Add Comment
Please, Sign In to add comment