Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

how to allow visitors to change website style?

guys I am working on a university project atm and I need some advice

the website is static so no server side language, how would I go about giving visitors the option to change font family, maybe some background colors etc?

obviously I know how to do that but the trick is, how would I make this data persist and not go away when a visitor browses to a different page

thanks in advance

1 Answer

I would use a Javascript framework like AngularJS or EmberJS. There are new tutorials for both of those here on Treehouse.

Here's an example of making style changes using Angular's ng-class directive. You can read about that particular example more in the documentation.