Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Slider: Demo dynamic creation
Browse files Browse the repository at this point in the history
Fixes gh-7545
  • Loading branch information
Gabriel Schulhof committed Jul 6, 2014
1 parent cb9112a commit 8af9609
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions demos/slider/index.php
Expand Up @@ -20,6 +20,14 @@
margin-left: 15px;
}
</style>
<script id="dynamic-slider">
$( document ).on( "pagecreate", function() {
$( "<input type='number' data-type='range' min='0' max='100' step='1' value='17'>" )
.appendTo( "#dynamic-slider-form" )
.slider()
.textinput()
});
</script>
</head>
<body>
<div data-role="page" class="jqm-demos" data-quicklinks="true">
Expand Down Expand Up @@ -134,6 +142,14 @@
</form>
</div><!-- /demo-html -->

<h2>Dynamically injected</h2>
<p>The slider below has been created at runtime.</p>

<div data-demo-html="true" data-demo-js="#dynamic-slider">
<form id="dynamic-slider-form">
</form>
</div>

</div><!-- /content -->

<?php include( '../jqm-navmenu.php' ); ?>
Expand Down

0 comments on commit 8af9609

Please sign in to comment.