FrelonVert
New Member
I have a reference site for a series of books, and I'd like to make it so that readers can avoid spoilers. The idea I had was to make a setup webpage where they click on a checkbox for each book from which they want to see info. I could then store that (somehow) as a cookie for each time that they visit the site, plus have it work for each page in the site. So, one page might have this:\[code\]<li class="teotw">Rand killed a Trolloc</li>\[/code\]and another page might have\[code\]<li class="teotw">Nynaeve tugged her braid</li>\[/code\]and that information would not show up on the page unless they had checked the box for the "teotw" book. My initial thoughts are to do something like toggling the CSS class value like this:\[code\]document.styleSheets[0]['cssRules'][0].class['teotw'] = 'display:none'; document.styleSheets[0]['cssRules'][0].class['teotw'] = 'display:inherit'; \[/code\]but I'm not sure if this is the best method. Firstly, it would only apply to the current document only so I'd need a way to re-apply it to each page they visit. I'm using YUI as well, if it matters.Any ideas on the best way of doing this?