jQuery UI Functional Test Suite

Say it in Smalltalk, Do it with jQuery

Tabs Widget

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

Demo

Smalltalk

JQTabsFunctionalTest>>renderContentOn: html
   html div
      script: (html jQuery new tabs
         selected: selectedTab;
         onSelect: (html jQuery ajax
            callbackTabs: [ :event | selectedTab:= event at: #index ]));
      with: [
         html unorderedList: [
            self berries keysAndValuesDo: [ :name :description |
               html listItem: [
                  html anchor
                     url: (html jQuery ajax
                        html: [ :h | h text: description ];
                        fullUrl);
                     with: name ] ] ] ]

Source

< =>
  <>
    <>
      < =>Blackberry</>
    </>
    <>
      < =>Raspberry</>
    </>
    <>
      < =>Blueberry</>
    </>
    <>
      < =>Cranberry</>
    </>
    <>
      < =>Cloudberry</>
    </>
  </>
</>
< =>/*<![CDATA[*/$("#id33").tabs({"selected":0,"select":function(){$.ajax({"url":"/javascript/jquery-ui/tabswidget","data":["_s=Q6vBOF4AxWxzWzRs","_k=v8UzDGdivBXOu68z","31","32="+encodeURIComponent($(arguments[1].tab).attr("id")+","+$(arguments[1].panel).attr("id")+","+arguments[1].index)].join("&")})}});/*]]>*/</>