Projet

Général

Profil

Paste
Télécharger (981 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / adaptivetheme / at_core / scripts / outside-events.js @ 74f6bef0

1
/*!
2
 * jQuery outside events - v1.1 - 3/16/2010
3
 * http://benalman.com/projects/jquery-outside-events-plugin/
4
 *
5
 * Copyright (c) 2010 "Cowboy" Ben Alman
6
 * Dual licensed under the MIT and GPL licenses.
7
 * http://benalman.com/about/license/
8
 */
9
(function(e,t,n){"$:nomunge";function r(r,i){function u(t){e(s).each(function(){var n=e(this);if(this!==t.target&&!n.has(t.target).length){n.triggerHandler(i,[t.target])}})}i=i||r+n;var s=e(),o=r+"."+i+"-special-event";e.event.special[i]={setup:function(){s=s.add(this);if(s.length===1){e(t).bind(o,u)}},teardown:function(){s=s.not(this);if(s.length===0){e(t).unbind(o)}},add:function(e){var t=e.handler;e.handler=function(e,n){e.target=n;t.apply(this,arguments)}}};}e.map("click dblclick mousemove mousedown mouseup mouseover mouseout touchstart touchend touchmove change select submit keydown keypress keyup".split(" "),function(e){r(e)});r("focusin","focus"+n);r("focusout","blur"+n);e.addOutsideEvent=r;})(jQuery,document,"outside")