1(function ($) { 2 "use strict"; 3 4 blonweThemeModule.loginform = function() { 5 6 const tab = document.querySelectorAll('.login-page-tab li'); 7 const form = document.querySelector('.login-form-container'); 8 9 if (tab !== null && form !== null) { 10 const removeClass = () => { 11 for ( var i = 0; i < tab.length; i++ ) { 12 if ( tab[i].children[0].classList.contains( 'active' ) ) { 13 tab[i].children[0].classList.remove('active'); 14 } 15 } 16 } 17 18 for ( var i = 0; i < tab.length; i++ ) { 19 const button = tab[i].children[0]; 20 button.addEventListener( 'click', (event) => { 21 event.preventDefault(); 22 if ( !event.target.classList.contains( 'active' ) ) { 23 removeClass(); 24 event.target.classList.add( 'active' ); 25 form.classList.toggle( 'show-register-form' ); 26 } 27 }); 28 } 29 30 if(window.location.hash == '#register'){ 31 $( '.login-page-tab li a' ).removeClass(); 32 $( '.login-page-tab li:last-child a' ).addClass( 'active' ); 33 form.classList.toggle( 'show-register-form' ); 34 } 35 36 } 37 38 39 } 40 41 $(document).ready(function() { 42 blonweThemeModule.loginform(); 43 }); 44 45})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.