create the scrollview, then create it again. contents is wrong
see code below:
<!doctype html>
<html>
<body>
<head>
<style>
.my-scrollview {
color: #fff;
}
</style>
<link rel=”stylesheet” type=”text/css” href=”../js/libs/jqwidgets-ver3.6.0/jqwidgets/styles/jqx.base.css” >
<script src=”../js/libs/jquery-1.11.1.min.js” ></script>
<script src=”../js/libs/jqwidgets-ver3.6.0/jqwidgets/jqxcore.js”></script>
<script src=”../js/libs/jqwidgets-ver3.6.0/jqwidgets/jqxscrollview.js”></script>
</head>
<body>
<div class=”my-scrollview”></div>
create scroll view
<br>
pages to create:
<br>
<input class=”pageno” value=”10″/>
<script>
$(document).ready(function() {
function createScrollView(pageno)
{
var str = “”;
for (var i = 0; i < pageno; i++)
str += “<div>this is page ” + i + “</div>”;
$(“.my-scrollview”).html(str);
var o = $(“.my-scrollview”).jqxScrollView({
width: 500,
height: 200,
buttonsOffset: [0, 10],
moveThreshold: 0.2,
slideShow: true,
slideDuration: 3000,
showButtons: true
});
}
$(“.create-scroll-view”).click(function(e) {
var pageno = $(“.pageno”).val();
createScrollView(pageno);
});
});
</script>
</body>
</html>