Code:
<!DOCTYPE html>
<html lang="en">
<head>
<script src="jquery-1.10.2.js"></script>
<script src="jquery-ui.js"></script>
<link href="jquery-ui.css" rel="stylesheet" />
<script>
$("document").ready(function(){
$("#div1").slider({slide:function(event,ui){
$("#div2").html(ui.value)}})
})
</script>
<style>
#div1{
width:200px;
height:20px;
background-color:red;
border:1px solid;
}
</style>
</head>
<body>
<div id="div1"></div>
<div id="div2"></div>
</body>
</html>
Output:
<!DOCTYPE html>
<html lang="en">
<head>
<script src="jquery-1.10.2.js"></script>
<script src="jquery-ui.js"></script>
<link href="jquery-ui.css" rel="stylesheet" />
<script>
$("document").ready(function(){
$("#div1").slider({slide:function(event,ui){
$("#div2").html(ui.value)}})
})
</script>
<style>
#div1{
width:200px;
height:20px;
background-color:red;
border:1px solid;
}
</style>
</head>
<body>
<div id="div1"></div>
<div id="div2"></div>
</body>
</html>
Output:
0 comments:
Post a Comment