Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict';
- var App = App || {};
- App.PhotoContainerView = Backbone.View.extend({
- el: '.photos-container',
- scrollY: 0,
- scrollYD: 0,
- events: function(){
- var action = (Modernizr.touch) ? 'touchend' : 'click',
- e = {};
- e[ 'touchstart .lightbox'] = 'setScrollY';
- e[ 'touchend .lightbox'] = 'checkForScroll';
- return e;
- },
- setScrollY: function(e){
- this.scrollY = $(window).scrollTop();
- },
- checkForScroll: function(){
- this.scrollYD = $(window).scrollTop();
- if(this.scrollY !== this.scrollYD){
- return false;
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement