Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.       S(document)
  2.         .on('click.fndtn.reveal', this.close_targets(), function (e) {
  3.           e.preventDefault();
  4.           if (!self.locked) {
  5.             var settings = S('[' + self.attr_name() + '].open').data(self.attr_name(true) + '-init') || self.settings,
  6.                 bg_clicked = S(e.target)[0] === S('.' + settings.bg_class)[0];
  7.  
  8.             if (bg_clicked) {
  9.               if (settings.close_on_background_click) {
  10.                 e.stopPropagation();
  11.               } else {
  12.                 return;
  13.               }
  14.             }
  15.  
  16.             self.locked = true;
  17.             self.close.call(self, bg_clicked ? S('[' + self.attr_name() + '].open:not(.toback)') : S(this).closest('[' + self.attr_name() + ']'));
  18.           }
  19.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement