I'm wondering if it is possible to have cookies work on tabs that are loaded via ajax.
Users select data from a table above and it is loaded via ajax below the table. Some of the data is in tabs and I'm wondering if it is possible to save a cookie and pass it along to the fresh set of tabs when a user selects another row from the database. Having no cookie persistence is not desirable for users
- $(function(){
- $('.tabs').tabs({ cookie: { name: 'tab_cookie', expires: 1 } });
- });
I was hoping the below would work... but of course this does not work..
- function editClient(id) {
- $('#loading').show();
- $.ajax({ url: "ajax/editClient.php?edit="+id, cache: false, success: function(html){ $('#loading').hide(); $("#ajax").children().remove(); $(".tabs").remove(); $("#ajax").append(html); $('.tabs').tabs({ selected: 'tab_cookie' });