Bind change event to slider
Description
The following code shows how to bind change event to slider.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.6.3.js'></script>
<script type="text/javascript"
src="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.js"></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css">
<script type='text/javascript'>
$(window).load(function(){<!-- w w w . j av a2s . c o m-->
$("#slider").bind("change", function(event, ui) {
alert("test");
});
});
</script>
</head>
<body>
<div data-role="page">
<div data-role="content">
<p>Page content goes here.</p>
<div data-role="fieldcontain">
<label for="slider">Input slider:</label>
<input type="range" name="slider" id="slider" value="0" min="0" max="255" />
</div>
</div>
<!-- /content -->
</div>
<!-- /page -->
</body>
</html>