CodeIgniter Forums

Full Version: Running javascript on mobiles devices
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, i´m new on Codeigniter and i have a little problem with him when testing on mobile device. For example:

Code:
<select id="sampleSelect">
           <option value="1">1</option>
           <option value="2">2</option>
           <option value="3">3</option>
       </select>
<div id="sampleDiv">
   
</div>

<script>
    // This takes out the jQuery variable '$' from the global scope
    $('#sampleSelect').change(function(){
        $( "#sampleSelect option:selected" ).each(function() {
            $('#sampleDiv').text($( this ).val());
        });
    });
</script>


Only not working when i test on mobile device. On descktop works, i not understand why!. I tried use jQuery mobile, but it does not work.
Sorry for my level english, and thaks for help.