Listrap is a Bootstrap plugin for generate selectable lists by selecting item's thumbnail, ideal for mobile applications.
For a live example, see http://bootsnipp.com/snippets/v8RXA.
HTML
<ul>
<li>
<div class="listrap-toggle">
<span></span>
<img src="http://lorempixel.com/60/60/people/?v=1" class="img-circle" />
</div>
<strong>My option</strong>
</li>
...
</ul>
JavaScript
$("yourselector").listrap();
Returns an array with li
selected elements.
var selection = $("yourselector").listrap().getSelection();
Triggered when an item is selected. selection
argument is optional.
$("yourselector").listrap().on("selection-changed", function(selection) {
console.log(selection);
});
Licensed under MIT License. http://opensource.org/licenses/MIT