| Web Design and Hosting Creating sites, scripting, and hosting discussions. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Feb 07, 2010
Posts: 58
![]() Mac Specs: MacBook Black 2.4 GHz Intel Core 2 Duo, 4GB 667 MHz DDR2 SDRAM 320gb 7200rpm HDD Snow Leopard
|
I have a portfolio site and am wanting to make it auto detect and redirect to the mobile version. I have a mobile version created but I am having trouble understanding how to do this. Any help is appreciated.
|
| QUOTE Thanks | |
![]() Member Since: Nov 29, 2010
Location: Vancouver, BC, Canada
Posts: 24
![]() Mac Specs: Black 13.3" MacBook 4,1 Intel Core2 Duo, 4Gigs Ram (2x2G), 2.4GHz, OS X 10.7.2
|
Code:
<script type="text/javascript">// <![CDATA[
var mobile = (/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));
if (mobile) { document.location = "http://www.youtube.com";}
// ]]></script>
|
| QUOTE Thanks | |
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,314
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
Take a look at this page I created a while back. All it does is print back some info about the browser and platform of the user using MooTools. It doesn't redirect but it does show how easy it is to use MooTools to do basic detection. Feel free to take what you need from the source. Important Links: Community Guidelines : Use the reputation system if you've been helped. M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
||||
| QUOTE Thanks | |||||
![]() Member Since: Feb 07, 2010
Posts: 58
![]() Mac Specs: MacBook Black 2.4 GHz Intel Core 2 Duo, 4GB 667 MHz DDR2 SDRAM 320gb 7200rpm HDD Snow Leopard
|
Quote:
|
|
| QUOTE Thanks | ||
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,314
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
Important Links: Community Guidelines : Use the reputation system if you've been helped. M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
| QUOTE Thanks | |
![]() Member Since: Feb 07, 2010
Posts: 58
![]() Mac Specs: MacBook Black 2.4 GHz Intel Core 2 Duo, 4GB 667 MHz DDR2 SDRAM 320gb 7200rpm HDD Snow Leopard
|
Quote:
EDIT: putting the mobile folder path worked! Thanks for the help! Last edited by bassguy86; 05-06-2012 at 12:06 AM. Reason: update on situation |
|
| QUOTE Thanks | ||
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Mac app to create local web site search? | David Winter | Web Design and Hosting | 0 | 10-10-2011 07:38 AM |
| Vudu avoids Apple rev share split with iPad mobile site | OneMoreThing... | Apple Rumors and Reports | 0 | 08-10-2011 06:20 AM |
| First-ever Macworld Mobile to be held at 2011 Mobile World Congress | the8thark | Apple Rumors and Reports | 0 | 09-07-2010 02:12 PM |
| Mobile Site? | therichad | Community Suggestions and Feedback | 1 | 08-11-2009 03:53 PM |
| HELP I'm trying to clean out old web site files from server | bluerose | Web Design and Hosting | 8 | 02-16-2005 09:42 PM |
All times are GMT -4. The time now is 11:03 AM.
Powered by vBulletin