+ 1
Can I somehow shorten the code on lines 7-10 (html page)?
2 Answers
+ 4
var anum = $('nav > div');
$.each([1700, 2300, 2900], function(index, value) {
anum.eq(index).delay(value).slideDown(550);
});
OR
$.each({1700:$('nav > div').eq(0), 2300:$('nav > div').eq(1), 2900:$('nav > div').eq(2)},
function(value, element) {
element.delay(value).slideDown(550);
});
and you can do this:
$('div').click(function(){
$('.divOps').fadeIn(400).delay(1200).fadeOut(200);
});
BTW, you can put the entire jQuery function in the JS tab and remove the script tag.
And I think you mean Oops, not Ops.
+ 1
thank you so much! :)