Menu icon Foundation

My Posts


My Comments

Lucas Barbay commented on Lucas Barbay's post over 5 years

Finally i found a solution :
```Javascript

$(document).foundation({
tab: {
callback : function (tab) {
var pan = String(tab.context).split("#"); //récupère le nom du panel
document.cookie="panel="+pan[1]; //injecte le nom du panel dans les cookies
console.log(tab.context);
}
}
});

  $(document).ready(function() {

    //alert(str);
    if (getCookie("panel") != "") {
      $('#panel2-1').removeClass('active');
      $('#panel2-1a').removeClass('active');
      $('#'+getCookie("panel")).addClass('active');
      $('#'+getCookie("panel")+'a').addClass('active');
    }        
  });
</script>

Lucas Barbay commented on Lucas Barbay's post over 5 years

Someone ?

Lucas Barbay commented on Jenifer Robb's post over 5 years

Hi,

I have the same problem like you. Did you have solv it ?

Thanks in advance for your aswer

Lucas Barbay commented on Lucas Barbay's post over 5 years

And how I use cookies ?

Posts Followed

No Content

Following

    No Content

Followers

My Posts


My Comments

You commented on Lucas Barbay's post over 5 years

Finally i found a solution :
```Javascript

$(document).foundation({
tab: {
callback : function (tab) {
var pan = String(tab.context).split("#"); //récupère le nom du panel
document.cookie="panel="+pan[1]; //injecte le nom du panel dans les cookies
console.log(tab.context);
}
}
});

  $(document).ready(function() {

    //alert(str);
    if (getCookie("panel") != "") {
      $('#panel2-1').removeClass('active');
      $('#panel2-1a').removeClass('active');
      $('#'+getCookie("panel")).addClass('active');
      $('#'+getCookie("panel")+'a').addClass('active');
    }        
  });
</script>

You commented on Lucas Barbay's post over 5 years

Someone ?

You commented on Jenifer Robb's post over 5 years

Hi,

I have the same problem like you. Did you have solv it ?

Thanks in advance for your aswer

You commented on Lucas Barbay's post over 5 years

And how I use cookies ?

Posts Followed

No Content

Following

  • No Content

Followers

  • No Content