```
<link href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" rel="stylesheet"></link>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

<script>
$(function() {
    $("#slider").slider({
        slide: function(event, ui) {
            if (ui.value < 33) {
                $("#1").fadeIn("slow");
                $("#2").fadeOut("slow");
                $("#3").fadeOut("slow");
            }
            else if (ui.value < 66) {
                $("#1").fadeOut("slow");
                $("#2").fadeIn("slow");
                $("#3").fadeOut("slow");
            }
            else {
                $("#1").fadeOut("slow");
                $("#2").fadeOut("slow");
                $("#3").fadeIn("slow");
            }
        }
    });
});
</script>

<div id="slider"></div>

<div id="content" >
    <div id="1" style="position:absolute;z-index:0;">A</div>
    <div id="2" style="position:absolute;z-index:1;display:none;">B</div>
    <div id="3" style="position:absolute;z-index:2;display:none;">C</div>
</div>

```

The code above uses jQuery UI to create a slider. The slider fades between content in 3 different div's. The code is great on a computer, but the slider it creates does not slide on a mobile phone. What DOES work fine on mobile is as follows:

```
<link href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" rel="stylesheet"></link>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script>
    function changecontent()
        {
        if (document.getElementById("slider").value<33){
            $("#1").fadeIn("slow");
            $("#2").fadeOut("slow");
            $("#3").fadeOut("slow");
        } else if (document.getElementById("slider").value<66){
            $("#1").fadeOut("slow");
            $("#2").fadeIn("slow");
            $("#3").fadeOut("slow");
        } else if (document.getElementById("slider").value>66){
            $("#1").fadeOut("slow");
            $("#2").fadeOut("slow");
            $("#3").fadeIn("slow");
        }
    };
</script>

<input type="range" name="slider" id="slider" value="0" min="0" max="100" onchange="changecontent()"/>
<div id="content">
    <div id="1" class="show" style="position:absolute;z-index:0;">A</div>
    <div id="2" class="hide" style="position:absolute;z-index:1;">B</div>
    <div id="3" class="hide" style="position:absolute;z-index:2;">C</div>
</div>

```

The code above 'works' on all browsers (mobile or not), but allows for no styling options and looks different on each browser. I'm fine with how it shows on mobile, but hate how it looks on IE and hate how it functions on Firefox.

Any JS/jQuery masters skillful enough to combine these so that the website will do one or the other based on screen resolution / device it's viewed on? I'm open to other options too. But I can't use jQuery Mobile due to JS conflict with the template I'm using. jQuery UI works fine.