Hi,
I have the following JS code, which slides in one of 2 hidden divs on click, and when you click them or the button the divs fade out.
I want to replicate the fadeOut on Blur too, but that part of my code isnt working for some reason.
Im a bit of a noob when it comes to JS, still learning. So any help would be muc apprecited
CODE:
$(document).ready(function(){
$(".btn-ncl").toggle(function(){
//Open info
$(".info-ncl").stop().animate({ down: "+=1200" }, 600)
$(".info-ncl").stop().slideDown("slow");
}, function(){
//Close info
$(".info-ncl").stop().animate({ down: "-=300" }, 1400)
$(".info-ncl").stop().fadeOut("slow");
});
$(".btn-gh").toggle(function(){
//Open info
$(".info-gh").stop().animate({ down: "+=1200" }, 600)
$(".info-gh").stop().slideDown("slow");
}, function(){
//Close info
$(".info-gh").stop().animate({ down: "-=300" }, 1400)
$(".info-gh").stop().fadeOut("slow");
});
$(".info-gh").blur(function(){
alert('blur');
$(".info-gh").stop().animate({ down: "-=300" }, 1400)
$(".info-gh").stop().fadeOut("slow");
});
});