tags:

views:

109

answers:

2

Hi. I am trying to fadeOut a few objects at the same time, here is my code:

$("#close-case-study").click(function() {
$("#case-study-btns").fadeOut(500);
$("[id$='-discover']").fadeOut(500);

});

The problem is they are not in sync one starts then the other follows a split second after. What am I doing wrong? Is it because the second selector is looking for more than one item with the id ending in -discover?

+4  A: 

Maybe this would help:

 $("#case-study-btns, [id$='-discover']").fadeOut(500);
wsanville
+3  A: 
$("#close-case-study").click(function() {
$("#case-study-btns, [id$='-discover']").fadeOut(500);
});
yoda