Welcome Guest, Not a member yet? Register   Sign In
Dynamic template switcher based on user selection
#4

[eluser]Richard Testani[/eluser]
I guess I replied as I did because I questioned why a user might want to switch out desktop and mobile versions. From a user standpoint they most likely don't want to have to choose. You are really best handling this with media query styles, since styles can be updated as a change occurs in the browser - namely size of the screen.

With that said, you can switch out content or styles on the fly with a little bit of jQuery then if you want the keep the state persistent, a session or cookie could take care of this.

Here's a simple example I threw together:
http://jsfiddle.net/Y5AMU/

While I included the template in the html, it could be a separate view and loaded with ajax.

Hope this gives you some direction.


Messages In This Thread
Dynamic template switcher based on user selection - by El Forum - 03-10-2013, 01:20 PM
Dynamic template switcher based on user selection - by El Forum - 03-10-2013, 02:30 PM
Dynamic template switcher based on user selection - by El Forum - 03-11-2013, 09:33 AM
Dynamic template switcher based on user selection - by El Forum - 03-11-2013, 10:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB