1

I have a button, by clicking on it should be create a cookie. I've tried to get it with jquery, and it's look like this:

HTML:

<a id="link" data-value="1">my link</a>

jQuery:

$('#link').click(function() {
    var value = $(this).attr('data-value');
    $.cookie('cookie', value);
});

So, it doesn't work. I have such type error: "Uncaught TypeError: undefined is not a function ".

Have you any propositions?

lalexa
  • 443
  • 3
  • 8
  • 16

0 Answers0