| Server IP : 94.177.215.211 / Your IP : 216.73.216.172 Web Server : nginx/1.26.0 System : Linux mtncompany-wp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : root ( 0) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source,eval MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/sites/morsiesorsi/wp-content/themes/woodmart/js/scripts/wc/ |
Upload File : |
/* global woodmart_settings */
(function($) {
woodmartThemeModule.loginTabs = function() {
var tabs = $('.wd-register-tabs'),
btn = tabs.find('.wd-switch-to-register'),
title = $('.col-register-text h2'),
loginText = tabs.find('.login-info'),
classOpened = 'active-register',
loginLabel = btn.data('login'),
registerLabel = btn.data('register'),
loginTitleLabel = btn.data('login-title'),
registerTitleLabel = btn.data('reg-title');
btn.on('click', function(e) {
e.preventDefault();
if (isShown()) {
hideRegister();
} else {
showRegister();
}
if (woodmartThemeModule.$window.width() < 769) {
$('html, body').stop().animate({
scrollTop: tabs.offset().top - 90
}, 400);
}
});
var showRegister = function() {
tabs.addClass(classOpened);
btn.text(loginLabel);
if (loginText.length > 0) {
title.text(loginTitleLabel);
}
};
var hideRegister = function() {
tabs.removeClass(classOpened);
btn.text(registerLabel);
if (loginText.length > 0) {
title.text(registerTitleLabel);
}
};
var isShown = function() {
return tabs.hasClass(classOpened);
};
};
$(document).ready(function() {
woodmartThemeModule.loginTabs();
});
})(jQuery);