Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Button/drop-down form headache! Reply To: Button/drop-down form headache!

#175246
Everton
Participant

Yes, there is, at the top of the HTML page:

<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js?ver=1.4.2″></script&gt;
<script src=”js/login.js”></script>

This is the JS:

// Login Form

$(function() {
var button = $(‘#loginButton’);
var box = $(‘#loginBox’);
var form = $(‘#loginForm’);
button.removeAttr(‘href’);
button.mouseup(function(login) {
box.toggle();
button.toggleClass(‘active’);
});
form.mouseup(function() {
return false;
});
$(this).mouseup(function(login) {
if(!($(login.target).parent(‘#loginButton’).length > 0)) {
button.removeClass(‘active’);
box.hide();
}
});
});