jQuery UI Functional Test Suite

Say it in Smalltalk, Do it with jQuery

Selectable Interaction

For additional documentation and examples please visit the official web-site.

Demo

  • Alfalfa
  • Clover
  • Peas
  • Beans
  • Lentils
  • Lupins
  • Peanuts

Smalltalk

JQSelectableFunctionalTest>>renderContentOn: html
   html unorderedList
      script: (html jQuery new selectable
         onStop: (html jQuery ajax
            callback: [ :value | selected := value asSet ]
            passengers: (html jQuery this find: '.ui-selected')));
      with: [
         self vegetables do: [ :each |
            html listItem
               class: 'ui-corner-all';
               class: 'ui-selected' if: (selected includes: each);
               passenger: each;
               with: each ] ]

Source

< =>
  < = =>Alfalfa</>
  < = =>Clover</>
  < = =>Peas</>
  < = =>Beans</>
  < = =>Lentils</>
  < = =>Lupins</>
  < = =>Peanuts</>
</>
< =>/*<![CDATA[*/$("#id35").selectable({"stop":function(){$.ajax({"url":"/javascript/jquery-ui/selectableinteraction","data":["_s=V6Oo1d5GM51F7aHZ","_k=yyxyg0Mg98WGNU87","33","34="+encodeURIComponent($.map($(this).find(".ui-selected").get(),function(each){return each.id}).join(","))].join("&")})}});/*]]>*/</>