Rishabh Mishra
Rishabh Mishra

Reputation: 508

Unable to save jquery cookies

hey friends i have make an chatbox with jquery but it is unable to save cookies please look my cade and tell me that why it is not working?

$(document).ready(function() {

    $(".trigger").click(function() {

        $(".chat").show("fast");

        $(this).showClass("active");

        $.cookie('chatbox', 'open', {
            expires: 7
        });

    });
});

Upvotes: 0

Views: 75

Answers (1)

Tyson Joseph Bedwell
Tyson Joseph Bedwell

Reputation: 48

The cookie code you posted was invalid. Use this:

$.cookie('chatbox', 'open');

Upvotes: 1

Related Questions