How can I hide a toggle when there's another toggle and if the user show the one inside and you hide the one outside the one inside keeps there? It should be hidden too.
I was not clear so here is the updated example: http://jsfiddle.net/jalxob/hEusd/5/
$('input[type="checkbox"]').click(function(){
if($(this).val()=="checking"){
$(".open-box").toggle();
if("none" == $(".open-box").css("display")) {
$(".box1").css("display", "none");
}
}
});
$('.open-box').click(function() {
$(".box1").slideToggle();
});