Share on Google+Share on Google+

jQuery UI Interaction : Selectable

This page discusses - jQuery UI Interaction : Selectable

jQuery UI Interaction : Selectable


jQuery UI Interaction : Selectable

Using jQuery Selectable plug-in , you can  make a group of element selectable. In the given below example, we are making list element selectable.

For options, events ,method and theming click here



<!DOCTYPE html>
<link href="
/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="
<script src="
<style type="text/css">
#feedback { font-size: 1.4em; }
#selectable .ui-selecting { background: #FECA40; }
#selectable .ui-selected { background: #F39814; color: white; }
#selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
#selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }
<script type="text/javascript">
$(function() {

<div class="demo">

<ol id="selectable">
<li class="ui-widget-content">Element 1</li>
<li class="ui-widget-content">Element 2</li>
<li class="ui-widget-content">Element 3</li>
<li class="ui-widget-content">Element 4</li>
<li class="ui-widget-content">Element 5</li>
<li class="ui-widget-content">Element 6</li>
<li class="ui-widget-content">Element 7</li>


Output :

You can select element/elements by click and also by holding ctrl key or by holding left key of mouse :

Download Source Code

Click here to see demo

Learn from experts! Attend jQuery Training classes.


Posted on: April 18, 2011 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Discuss: jQuery UI Interaction : Selectable  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
March 7, 2012
No link

i am following your lessons in here. and in this selectable section. no link in demo and code.