double click on first load, why ?
finally I get my Up and Down effect solved with these lines, but I noticed that I have to click the clickable the area twice on the first load, would anyone here tell me why ?
here's the code
- $(document).ready(function() {
- $("#slideHeader").click( function() {
- if ($("#openCloseIdentifier").is(":hidden")) {
- $(".boxgrid").animate({
- marginBottom: "-100px"
- }, {duration: 'slow', easing: 'easeInOutCubic'} );
- $('#myToggle').css('background-position', '0 0');
- $("#openCloseIdentifier").show();
- } else {
- $(".boxgrid").animate({
- marginBottom: "0px"
- }, {duration: 'slow', easing: 'easeInOutCubic'} );
- $('#myToggle').css('background-position', '0 -20px');
- $("#openCloseIdentifier").hide();
- }
- });
- });
thanks