Welcome Guest, Not a member yet? Register   Sign In
detect JS with CI?
#9

[eluser]Pascal Kriete[/eluser]
There is no really easy way to do this. You could try playing with dynamic layouts.

You will just have to choose a css file to use as your non-js standard. Then you could do something like this:
Code:
<head>
<meta http-equiv="content-type" content="text/html charset=utf-8" />
<title></title>

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8">

    cssloader = function() {        
        var w = $(window).width();
        
        if (w < 800)
            document. write('&lt;link rel="stylesheet" href="./test2.css" type="text/css" media="screen" title="no title" charset="utf-8"&gt;');
        else
            document. write('&lt;link rel="stylesheet" href="./test1.css" type="text/css" media="screen" title="no title" charset="utf-8"&gt;');
    }();

&lt;/script&gt;

<noscript>
&lt;link rel="stylesheet" href="./test1.css" type="text/css" media="screen" title="no title" charset="utf-8"&gt;
</noscript>

&lt;/head&gt;

You could, of course, replace the document. write (no space) with an ajax call.

Only tested in Safari


Messages In This Thread
detect JS with CI? - by El Forum - 04-24-2008, 11:50 AM
detect JS with CI? - by El Forum - 04-25-2008, 12:56 AM
detect JS with CI? - by El Forum - 04-25-2008, 01:52 AM
detect JS with CI? - by El Forum - 04-25-2008, 03:54 PM
detect JS with CI? - by El Forum - 04-25-2008, 09:15 PM
detect JS with CI? - by El Forum - 04-25-2008, 09:57 PM
detect JS with CI? - by El Forum - 04-25-2008, 10:28 PM
detect JS with CI? - by El Forum - 04-26-2008, 10:17 AM
detect JS with CI? - by El Forum - 04-26-2008, 11:02 AM
detect JS with CI? - by El Forum - 04-26-2008, 11:55 AM
detect JS with CI? - by El Forum - 04-26-2008, 01:09 PM
detect JS with CI? - by El Forum - 04-26-2008, 01:44 PM
detect JS with CI? - by El Forum - 04-27-2008, 11:42 AM
detect JS with CI? - by El Forum - 04-27-2008, 12:02 PM
detect JS with CI? - by El Forum - 04-27-2008, 01:17 PM
detect JS with CI? - by El Forum - 04-27-2008, 02:02 PM
detect JS with CI? - by El Forum - 04-27-2008, 02:06 PM
detect JS with CI? - by El Forum - 04-27-2008, 03:58 PM
detect JS with CI? - by El Forum - 04-27-2008, 04:03 PM
detect JS with CI? - by El Forum - 04-27-2008, 04:54 PM
detect JS with CI? - by El Forum - 04-27-2008, 10:43 PM
detect JS with CI? - by El Forum - 04-28-2008, 05:15 PM
detect JS with CI? - by El Forum - 04-29-2008, 09:00 AM
detect JS with CI? - by El Forum - 04-30-2008, 08:03 AM
detect JS with CI? - by El Forum - 04-30-2008, 08:26 AM
detect JS with CI? - by El Forum - 04-30-2008, 09:11 AM
detect JS with CI? - by El Forum - 04-30-2008, 11:59 AM
detect JS with CI? - by El Forum - 04-30-2008, 04:56 PM
detect JS with CI? - by El Forum - 08-11-2009, 04:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB