PHP Classes

File: vendors/select2/src/js/select2/compat/utils.js

Recommend this page to a friend!
  Classes of Jorge Castro   Gentelella BladeOne   vendors/select2/src/js/select2/compat/utils.js   Download  
File: vendors/select2/src/js/select2/compat/utils.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: 971 bytes
 

Contents

Class file image Download
define([ 'jquery' ], function ($) { function syncCssClasses ($dest, $src, adapter) { var classes, replacements = [], adapted; classes = $.trim($dest.attr('class')); if (classes) { classes = '' + classes; // for IE which returns object $(classes.split(/\s+/)).each(function () { // Save all Select2 classes if (this.indexOf('select2-') === 0) { replacements.push(this); } }); } classes = $.trim($src.attr('class')); if (classes) { classes = '' + classes; // for IE which returns object $(classes.split(/\s+/)).each(function () { // Only adapt non-Select2 classes if (this.indexOf('select2-') !== 0) { adapted = adapter(this); if (adapted != null) { replacements.push(adapted); } } }); } $dest.attr('class', replacements.join(' ')); } return { syncCssClasses: syncCssClasses }; });