slideToggle search bar and audio player

I could use some help with this…

$(document).keypress(function(e){
    var key = e.which;
    if (key == 43) {
        // if the user pressed '+':
        $('.swrapper').slideToggle(400).add('#search').focus();
        $('.swrapper').slideToggle(400).add('#audio-player-container');
    }
});

What I’d like to do is to simply hide the audio player when hiding the search bar. I already have the slideToggle for the searchbar itself which is this

$(document).keypress(function(e){
    var key = e.which;
    if (key == 43) {
        // if the user pressed '+':
        $('.swrapper').slideToggle(400).add('#search').focus();
    }
});

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.