Файловый менеджер - Редактировать - /home/infrafs/www/wp-content/plugins/eltd-core/shortcodes/button/assets/js/button.js
Назад
(function($) { 'use strict'; var button = {}; eltd.modules.button = button; button.eltdButton = eltdButton; button.eltdOnDocumentReady = eltdOnDocumentReady; $(document).ready(eltdOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function eltdOnDocumentReady() { eltdButton().init(); } /** * Button object that initializes whole button functionality * @type {Function} */ var eltdButton = function() { //all buttons on the page var buttons = $('.eltd-btn'); /** * Initializes button hover color * @param button current button */ var buttonHoverColor = function(button) { if(typeof button.data('hover-color') !== 'undefined') { var changeButtonColor = function(event) { event.data.button.css('color', event.data.color); }; var originalColor = button.css('color'); var hoverColor = button.data('hover-color'); button.on('mouseenter', { button: button, color: hoverColor }, changeButtonColor); button.on('mouseleave', { button: button, color: originalColor }, changeButtonColor); } }; /** * Initializes button hover background color * @param button current button */ var buttonHoverBgColor = function(button) { if(typeof button.data('hover-bg-color') !== 'undefined') { var changeButtonBg = function(event) { event.data.button.css('background-color', event.data.color); }; var originalBgColor = button.css('background-color'); var hoverBgColor = button.data('hover-bg-color'); button.on('mouseenter', { button: button, color: hoverBgColor }, changeButtonBg); button.on('mouseleave', { button: button, color: originalBgColor }, changeButtonBg); } }; /** * Initializes button border color * @param button */ var buttonHoverBorderColor = function(button) { if(typeof button.data('hover-border-color') !== 'undefined') { var changeBorderColor = function(event) { event.data.button.css('border-color', event.data.color); }; var originalBorderColor = button.css('borderTopColor'); //take one of the four sides var hoverBorderColor = button.data('hover-border-color'); button.on('mouseenter', { button: button, color: hoverBorderColor }, changeBorderColor); button.on('mouseleave', { button: button, color: originalBorderColor }, changeBorderColor); } }; return { init: function() { if(buttons.length) { buttons.each(function() { buttonHoverColor($(this)); buttonHoverBgColor($(this)); buttonHoverBorderColor($(this)); }); } } }; }; })(jQuery);
| ver. 1.4 |
Github
|
.
| PHP 8.2.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка