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 } );
精彩评论