File Editor
Directories:
.. (Back)
Files:
button.css
button.js
button.min.css
button.min.js
class-sinatra-customizer-control-button.php
Create New File
Create
Edit File: button.min.js
!function($){wp.customize.controlConstructor["sinatra-button"]=wp.customize.Control.extend({ready:function(){"use strict";this.container.on("click",".button",(function(e){var $this=$(this),action=$this.data("ajax-action");if(action){e.preventDefault(),$this.siblings(".spinner").addClass("activated");var data={_ajax_nonce:sinatra_customizer_localized.wpnonce,action:action};$.post(sinatra_customizer_localized.ajaxurl,data,(function(response){response.success&&($this.siblings(".spinner").removeClass("activated"),void 0!==response.data.reload&&response.data.reload&&location.reload())}))}}))}})}(jQuery);
Save Changes
Rename File
Rename