I think this has been done many times before but despite reading some posts about cookies couldn't get my head round it.
I have a second body class with different fonts for the whole site which is accessed when the client clicks a link to change font. Ideally, instead of this being on a page-by-page basis, the new class would 'stick' after a new page is visited. My change class code via jQuery looks like this:
$(document).ready(function() {
$("a#switcher").click(function() {
$("body").toggleClass("alternate_body");
});
});
Is there a relatively simple way of achieving this? Thanks in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…