PATH:
home
/
lab2454c
/
fcxpro.com
/
wp-content
/
plugins
/
webon-core
/
inc
/
shortcodes
/
button
/
assets
/
js
/
parts
(function ($) { "use strict"; qodefCore.shortcodes.webon_core_button = {}; $(document).ready(function () { qodefButton.init(); }); $(document).on('webon_trigger_get_new_posts', function (e, $holder) { qodefButton.init(); }); var qodefButton = { init: function () { this.buttons = $('.qodef-button'); if (this.buttons.length) { this.buttons.each(function () { var $thisButton = $(this); qodefButton.buttonHoverColor($thisButton); qodefButton.buttonHoverBgColor($thisButton); qodefButton.buttonHoverBorderColor($thisButton); qodefButton.buttonHoverAnimationClasses($thisButton); }); } }, buttonHoverColor: function ($button) { if (typeof $button.data('hover-color') !== 'undefined') { var hoverColor = $button.data('hover-color'); var originalColor = $button.css('color'); $button.on('mouseenter', function () { qodefButton.changeColor($button, 'color', hoverColor); }); $button.on('mouseleave', function () { qodefButton.changeColor($button, 'color', originalColor); }); } }, buttonHoverBgColor: function ($button) { if (typeof $button.data('hover-background-color') !== 'undefined') { var hoverBackgroundColor = $button.data('hover-background-color'); var originalBackgroundColor = $button.css('background-color'); $button.on('mouseenter', function () { qodefButton.changeColor($button, 'background-color', hoverBackgroundColor); }); $button.on('mouseleave', function () { qodefButton.changeColor($button, 'background-color', originalBackgroundColor); }); } }, buttonHoverBorderColor: function ($button) { if (typeof $button.data('hover-border-color') !== 'undefined') { var hoverBorderColor = $button.data('hover-border-color'); var originalBorderColor = $button.css('borderTopColor'); $button.on('mouseenter', function () { qodefButton.changeColor($button, 'border-color', hoverBorderColor); }); $button.on('mouseleave', function () { qodefButton.changeColor($button, 'border-color', originalBorderColor); }); } }, changeColor: function ($button, cssProperty, color) { $button.css(cssProperty, color); }, buttonHoverAnimationClasses: function ($button) { if ($button.hasClass('qodef-arrow-button')) { $button.each(function() { $(this).on("mouseenter", function () { $(this).removeClass("qodef-button-animation-out"); }) $(this).on("mouseleave", function () { $(this).addClass("qodef-button-animation-out"); }); }); } }, }; qodefCore.shortcodes.webon_core_button.qodefButton = qodefButton; })(jQuery);
[+]
..
[-] button.js
[edit]