On clicking of a button, I want three things to happen, a slideToggle, toggle between 2 classes, and a setting of a cookie.  I have the first two things working properly, I now need to set a cookie of companyDescriptionDiv to be either opened or closed depending on whether #showhide-company-description has a class of opened or closed
$(document).on('click', "#showhide-company-description", function () {
    $("#companydescription").slideToggle("slow", function () {
        $("#showhide-company-description").toggleClass("opened").toggleClass("closed");
    });
});
 
     
     
    