Skip to content

Instantly share code, notes, and snippets.

@alexanmtz
Created June 23, 2012 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexanmtz/2979287 to your computer and use it in GitHub Desktop.
Save alexanmtz/2979287 to your computer and use it in GitHub Desktop.
Markup of sliding living example
<form class="well custom-init">
<label for="option">Items</label>
<input type="text" placeholder="items to display" class="input-medium option-item" name="option-item">
<label for="option">Current page</label>
<input type="text" placeholder="default is 1" class="input-medium option-currentPage" name="option-currentPage">
<label for="option-autoHeight">autoHeight</label>
<select class="option-autoHeight" name="option-autoHeight">
<option value="1">true</option>
<option value="0">false</option>
</select>
<input type="submit" class="btn" value="Apply sliding" />
<h4>How to display current pages</h4>
<code>$('.current-page').html(element.sliding('getCurrentPage'));</code>
<p><small>Current page: </small><span class="current-page badge">?</span></p>
<h4>How to display total pages</h4>
<code>$('.current-page').html(element.sliding('getTotalPages'));</code>
<p><small>Total Pages: </small><span class="total-pages badge">?</span></p>
</form>
<div class="slide-live-example">
<ul class="unstyled">
<li><img src="http://placehold.it/140x30"></li>
<li><img src="http://placehold.it/140x50"></li>
<li><img src="http://placehold.it/140x90"></li>
<li><img src="http://placehold.it/140x80"></li>
<li><img src="http://placehold.it/140x50"></li>
<li><img src="http://placehold.it/140x80"></li>
<li><img src="http://placehold.it/180x90"></li>
<li><img src="http://placehold.it/140x70"></li>
<li><img src="http://placehold.it/140x40"></li>
<li><img src="http://placehold.it/140x30"></li>
<li><img src="http://placehold.it/140x80"></li>
<li><img src="http://placehold.it/140x40"></li>
<li><img src="http://placehold.it/140x90"></li>
<li><img src="http://placehold.it/140x80"></li>
<li><img src="http://placehold.it/140x90"></li>
<li><img src="http://placehold.it/140x100"></li>
</ul>
</div>
<div class="live-pagination">
<a href="#" class="btn live-previous">Previous</a>
<a href="#" class="btn live-next">Next</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment