Handle change event from slider
Description
The following code shows how to handle change event from slider.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.6.2.js'></script>
<script type='text/javascript'
src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.js"></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.css">
<script type='text/javascript'>
$(function(){<!--from ww w . ja v a 2s.c o m-->
$('select#flag').change(function() {
alert("onchange")
});
});
</script>
</head>
<body>
<div id="page" data-role="page">
<select name="flag" id="flag" data-role="slider">
<option value="off">OFF</option>
<option value="on" selected="selected">ON</option>
</select>
</div>
</body>
</html>