File Editor
Directories:
.. (Back)
Files:
checkbox-group.css
checkbox-group.js
checkbox-group.min.css
checkbox-group.min.js
class-sinatra-customizer-control-checkbox-group.php
Create New File
Create
Edit File: checkbox-group.min.js
!function($){"use strict";wp.customize.controlConstructor["sinatra-checkbox-group"]=wp.customize.Control.extend({ready:function(){var control=this;control.setting.get();control.container.on("click",'input[type="checkbox"]',(function(){control.save()}))},save:function(){var value=[];this.container.find('input[type="checkbox"]').each((function(index,el){$(el).is(":checked")&&value.push($(el).data("id"))})),this.setting.set(value)}})}(jQuery);
Save Changes
Rename File
Rename