Hello I am playing with code whilst learning jQuery and I can't figure out how to make the Login button to work on first click. At the moment it works only on second click.
$('#login').on({
'click': function() {
$('#duck').attr('src', rand);
if (login_username.value !== 'Endra') {
$('.login').toggleClass('animated shake');
$('.babe').html("Hello unknown,enter a name.");
}