function hidePopup() { $('.js-popup .flash-message').addClass('hidden').removeClass('error'); $('.js-popup').fadeOut('fast', function() { $(this).removeClass('active').css('display', ''); $('.js-popup.popup-background').removeClass('active'); $('body').removeClass('u-noscroll'); }); } function showPopup($popup) { var $background = $('.js-popup.popup-background'); $('.js-close-popup', $popup).off('click').on('click', function(e) { e.preventDefault(); hidePopup(); }); $popup.fadeIn('slow', function() { $(this).addClass('active'); }); $background.fadeIn('slow', function() { $(this).addClass('active'); }); $('body').addClass('u-noscroll'); } function resetInputClasses(input) { wrapper = input.closest('.js-input-wrapper'); $('.js-hint', wrapper).removeClass('question').removeClass('exclamation').addClass('hidden'); $('.with-error', wrapper).removeClass('with-error'); $('input.error', wrapper).removeClass('error'); } function resetFormClasses(form){ $('.js-hint', form).removeClass('question').removeClass('exclamation').addClass('hidden'); $('.with-error', form).removeClass('with-error'); $('input.error', form).removeClass('error'); } function clearInputs() { $("input[type='text'], input[type='email'], input[type='password']", $('.js-popup form')).val(''); $(".js-popup form textarea").val(''); } $('js-close-popup').off('click').on('click', hidePopup); function checkStrength(password) { var strength = 0 if (password.length < 6) { $('.password-strength-bar').removeClass('password-strength-bar-green') $('#password-strength-result').text() $('#password-strength-result').text('Too Short') return 'Too short' } if (password.length > 7) strength += 1 // If password contains both lower and uppercase characters, increase strength value. if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) strength += 1 // If it has numbers and characters, increase strength value. if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) strength += 1 // If it has one special character, increase strength value. if (password.match(/([!,%,&,@,#,$,^,*,?,_,~])/)) strength += 1 // If it has two special characters, increase strength value. if (password.match(/(.*[!,%,&,@,#,$,^,*,?,_,~].*[!,%,&,@,#,$,^,*,?,_,~])/)) strength += 1 // Calculated strength value, we can return messages // If value is less than 2 if (strength < 2) { $('.password-strength-bar').removeClass('password-strength-bar-green') $('#password-strength-result').text() $('#password-strength-result').text('Weak') $('.password-progress-bar div:nth-child(1)').addClass('password-strength-bar-green') return 'Weak' } else if (strength == 2) { $('.password-strength-bar').removeClass('password-strength-bar-green') $('#password-strength-result').text() $('#password-strength-result').text('Good') // $('.password-progress-bar div:nth-child(1n)').addClass('password-strength-bar-green') $('.password-progress-bar').children().slice(0,3).addClass('password-strength-bar-green') return 'Good' } else { $('.password-strength-bar').removeClass('password-strength-bar-green') $('#password-strength-result').text() $('#password-strength-result').text('Strong') $('.password-strength-bar').addClass('password-strength-bar-green') return 'Strong' } } var signup_event_popup = $('.js-signup-popup'); signup_event_popup.html('
Join our club, meet other <\/p>
investors and start looking for <\/p>
exciting startups to invest in. <\/p><\/header>
Leapfunder is a social network for Angel investors. You may receive emails with contact requests, updates, deal-flow, etc. You can adjust these settings anytime easily.<\/p>