开发者

onclick() Delete JQuery UI tabs cookie

I'm using JQuery UI tabs with cookie like this.

  jQuery(document).ready(function() {
    jQuery("#tabs").tabs({cookie开发者_运维知识库: { expires: 30}  });
  });

  <a href="#" class="delete-cookie" >Delete Coockie</a>

I want to know how can I set cookie to null / delete using onclick event.

Thanks.


please check this?

jQuery(document).ready(function() {
            jQuery('.delete-cookie').click ( function () {
            jQuery('#tabs').tabs({cookie: {} });
    });

})

or try this

jQuery( ".delete-cookie" ).tabs( "click", "cookie", { expires: 30 } );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜