Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. 'use strict';
  2.  
  3. var App = App || {};
  4.  
  5. App.PhotoContainerView = Backbone.View.extend({
  6.  
  7. el: '.photos-container',
  8.  
  9. scrollY: 0,
  10.  
  11. scrollYD: 0,
  12.  
  13. events: function(){
  14. var action = (Modernizr.touch) ? 'touchend' : 'click',
  15. e = {};
  16.  
  17. e[ 'touchstart .lightbox'] = 'setScrollY';
  18. e[ 'touchend .lightbox'] = 'checkForScroll';
  19.  
  20. return e;
  21. },
  22.  
  23. setScrollY: function(e){
  24. this.scrollY = $(window).scrollTop();
  25. },
  26.  
  27. checkForScroll: function(){
  28. this.scrollYD = $(window).scrollTop();
  29. if(this.scrollY !== this.scrollYD){
  30. return false;
  31. }
  32. }
  33.  
  34. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement