Home › Forums › CSS › Button/drop-down form headache! › Reply To: Button/drop-down form headache!
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>
<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();
}
});
});