PHP Classes

File: vendors/gentelella/vendors/select2/src/js/select2/selection/clickMask.js

Recommend this page to a friend!
  Classes of Jorge Castro   Gentelella BladeOne   vendors/gentelella/vendors/select2/src/js/select2/selection/clickMask.js   Download  
File: vendors/gentelella/vendors/select2/src/js/select2/selection/clickMask.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Gentelella BladeOne
Render templates using Bootstrap for presentation
Author: By
Last change:
Date: 3 years ago
Size: 652 bytes
 

Contents

Class file image Download
define([ 'jquery' ], function ($) { function ClickMask () { } ClickMask.prototype.bind = function (decorate, $container, container) { var self = this; decorate.call(this, $container, container); this.$mask = $( '<div class="select2-close-mask"></div>' ); this.$mask.on('mousedown touchstart click', function () { self.trigger('close', {}); }); }; ClickMask.prototype._attachCloseHandler = function (decorate, container) { $(document.body).append(this.$mask); }; ClickMask.prototype._detachCloseHandler = function (deocrate, container) { this.$mask.detach(); }; return ClickMask; });