inosoftbr / listrap

Listrap is a Bootstrap plugin for generate selectable lists by selecting item's thumbnail, ideal for mobile applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

listrap

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.

How to use

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();

Methods

getSelection

Returns an array with li selected elements.

var selection = $("yourselector").listrap().getSelection();

Events

selection-changed

Triggered when an item is selected. selection argument is optional.

$("yourselector").listrap().on("selection-changed", function(selection) {
  console.log(selection);
});

License

Licensed under MIT License. http://opensource.org/licenses/MIT

About

Listrap is a Bootstrap plugin for generate selectable lists by selecting item's thumbnail, ideal for mobile applications.


Languages

Language:CSS 59.4%Language:JavaScript 40.6%