Advertisement
Guest User

Untitled

a guest
Sep 15th, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var MM = MM || {};
  2.  
  3. MM.InadequateResponse = function() {
  4.     var self = this;
  5.     var gridItem = $('.grid-item');
  6.  
  7.     gridItem.click(self.toggleGridContent);
  8.    
  9.     self.init = function() {
  10.         gridItem.click(self.toggleGridContent);
  11.         console.log('hi')
  12.     }
  13.  
  14.     self.toggleGridContent = function(e) {
  15.         e.stopPropagation();
  16.  
  17.         $(this).toggleClass('active');
  18.         console.log(this);
  19.     }
  20. };
  21.  
  22. (function(){
  23.     var InadequateResponse = new MM.InadequateResponse();
  24.     InadequateResponse.init();
  25. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement