range slider inside panel doesn't work
I have some sort of canvas paint apss on mobile. I would like to increase the paint brush size simply with a range slider but as soon as I increase the value in the slider, the paint brush size does'nt seem to increase at all. Here's the code. I put the range slider inside a panel
- <div data-role="panel" data-position="bottom" data-display="overlay" id="bottompaneloverlay2" data-theme="a">
- <div class="ui-bar ui-bar-c">
- <form id="largeurs_pinceau">
- <label for="largeurs_pinceau">Brush Size:</label>
- <input id="largeurs_pinceau" name="largeurs_pinceau" data-mini="true" type="range" data-highlight="true" min="2" max="50" value="5" />
- <output id="output">5 pixels</output>
-
- </form>
- </div>
and the javascript of the following is as follows
- $("#largeurs_pinceau input[type=range]").change(function() {
- if (!isNaN($(this).val())) {
- width_brush = $(this).val();
- $("#output").html($(this).val() + " pixels");
- }
- });
could anyone tell me what seems to be the problem here? Thanks in advance