check to see if slidetoggle is open code example
Example: jquery do something if toggle open and close
$('.advance-view').click(function() {
$('#advance-control').slideToggle('slow', function() {
if ($('#advance-control').is(':hidden'))
{
$('.advance-view').css("background-color", "#2B509A");
}
else
{
$('.advance-view').css("background-color", "#4D6837");
}
});
});