When screensize is smaller than...use template 'B'

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Locked
Markgoessens
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Oct 12, 2011 9:00 am

When screensize is smaller than...use template 'B'

Post by Markgoessens » Thu Jul 11, 2013 8:47 am

Hi all,

I've made mobile website (not with joomla) for a customer.
The desktop website is an 'old' website in Joomla 1.5.

At the mobile website I made a button with 'switch to desktop version'
Actually, this doesn't work. Because at the desktop version I have a script which leads automatically to the mobile version when the screensize is smaller than 700 pixels.

Code: Select all

	<script type="text/javascript">
<!--
if (screen.width <= 699) {
document.location = "http://m.gadjahmas.nl";
}
//-->
</script>
So I will redirected back to mobile site.

At Wordpress there is a component called: 'themes by screensize'
With this component I can set a screensize, and a target template.
So when the screensize is smaller than 700 pixels, us template 'B'
Template 'B' is the same template, but without the redirection code a placed at the top.

Concrete, I can't find a plugin for this. Is there a javascript to change the template when the screensize is smaller than 700px?
I did a lot of research on google, but I can't find anything useful.

I hope someone can help me.

Greets, Mark

Locked

Return to “Joomla! 1.5 Coding”