jjyQuery Part III: Rich Interfaces with jQuery...

25
© 2010 Marty Hall jQuery Part III: Rich Interfaces with jQuery UI (jQuery 1.3, jQuery UI 1.7) Originals of Slides and Source Code for Examples: http://courses.coreservlets.com/Course-Materials/jquery .html Customized Java EE Training: http://courses.coreservlets.com/ Servlets, JSP, JSF 1.x, JSF 2.0, Struts, Ajax, GWT 2.0, GXT, Spring, Hibernate/JPA, Java 5, Java 6. Developed and taught by well-known author and developer. At public venues or onsite at your location. © 2010 Marty Hall For live Ajax & GWT training, see training t htt // lt / courses at http://courses.coreservlets.com/. Taught by the author of Core Servlets and JSP, More Servlets and JSP and this tutorial Available at More Servlets and JSP, and this tutorial. Available at public venues, or customized versions can be held on-site at your organization. C d l d dt ht b M t H ll Customized Java EE Training: http://courses.coreservlets.com/ Servlets, JSP, JSF 1.x, JSF 2.0, Struts, Ajax, GWT 2.0, GXT, Spring, Hibernate/JPA, Java 5, Java 6. Developed and taught by well-known author and developer. At public venues or onsite at your location. Courses developed and taught by Marty Hall Java 6, servlets/JSP (intermediate and advanced), Struts, JSF 1.x, JSF 2.0, Ajax, GWT 2.0 (with GXT), custom mix of topics Ajax courses can concentrate on 1 library (jQuery, Prototype/Scriptaculous, Ext-JS, Dojo, Google Closure) or survey several Courses developed and taught by coreservlets.com experts (edited by Marty) Spring, Hibernate/JPA, EJB3, Web Services, Ruby/Rails Contact [email protected] for details

Transcript of jjyQuery Part III: Rich Interfaces with jQuery...

Page 1: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

© 2010 Marty Hall

jQuery Part III: j yRich Interfaces with jQuery UI

(jQuery 1.3, jQuery UI 1.7)(j y , j y )

Originals of Slides and Source Code for Examples:http://courses.coreservlets.com/Course-Materials/jquery.html

Customized Java EE Training: http://courses.coreservlets.com/Servlets, JSP, JSF 1.x, JSF 2.0, Struts, Ajax, GWT 2.0, GXT, Spring, Hibernate/JPA, Java 5, Java 6.

Developed and taught by well-known author and developer. At public venues or onsite at your location.

p jq y

© 2010 Marty Hall

For live Ajax & GWT training, see training t htt // l t /courses at http://courses.coreservlets.com/.

Taught by the author of Core Servlets and JSP, More Servlets and JSP and this tutorial Available at More Servlets and JSP, and this tutorial. Available at public venues, or customized versions can be held

on-site at your organization.C d l d d t ht b M t H ll

Customized Java EE Training: http://courses.coreservlets.com/Servlets, JSP, JSF 1.x, JSF 2.0, Struts, Ajax, GWT 2.0, GXT, Spring, Hibernate/JPA, Java 5, Java 6.

Developed and taught by well-known author and developer. At public venues or onsite at your location.

• Courses developed and taught by Marty Hall– Java 6, servlets/JSP (intermediate and advanced), Struts, JSF 1.x, JSF 2.0, Ajax, GWT 2.0 (with GXT), custom mix of topics– Ajax courses can concentrate on 1 library (jQuery, Prototype/Scriptaculous, Ext-JS, Dojo, Google Closure) or survey several

• Courses developed and taught by coreservlets.com experts (edited by Marty)– Spring, Hibernate/JPA, EJB3, Web Services, Ruby/Rails

Contact [email protected] for details

Page 2: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Topics in This Section

• Overview• Installation and setup• Widgets

– Static tabbed panels– Ajax tabbed panels– Accordion panels– Date picker

Slider– Slider– Progress bar

5

© 2010 Marty Hall

Introduction

Customized Java EE Training: http://courses.coreservlets.com/Servlets, JSP, JSF 1.x, JSF 2.0, Struts, Ajax, GWT 2.0, GXT, Spring, Hibernate/JPA, Java 5, Java 6.

Developed and taught by well-known author and developer. At public venues or onsite at your location.

Page 3: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Overview

• Set of rich GUI elements and effects– Tabbed panels, slider, etc– Effects similar to Scriptaculous– Drag and drop APIDrag and drop API

• Pros– Official part of jQueryp j y– Well tested– Very clean design

Many still show meaningful results if JavaScript disabled– Many still show meaningful results if JavaScript disabled– Theming framework

• ConsCons– No autocompleter (!)– Not as extensive as Dojo, ext/JS, or YUI

7

Downloading

• Download custom bundleh //j i /d l d– http://jqueryui.com/download

– Select widgets and effects you want– Press “Download” to download ZIP file of result

• Unzip– Unzip result into location of your choice

D l d dditi l th• Download additional themes– http://jqueryui.com/download– Deselect all widgets and options, choose different themeDeselect all widgets and options, choose different theme

• You can also interactively build a customized theme– Unzip and copy entries in “css” folder to “css” folder of

original downloadoriginal download• Bookmark the documentation

– http://docs.jquery.com/UI/8

Page 4: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Installing Files

• Load normal jQuery as before– jQuery UI download gives an additional copy in “js”

folder, so if you are using jQuery UI, one download from jqueryui.com is sufficientjq y

• As discussed in previous sections, it is common to rename jQuery-1.3.x.min.js to jQuery.js to simplify upgrades

• Copy jQuery-ui-1.7.x.custom.min.jsCopy jQuery ui 1.7.x.custom.min.js– E.g., copy download_folder/js/jQuery-ui-

1.7.x.custom.min.js to WebContent/scriptsIt i t l d t il d f thi fil i UI– It is common to leave detailed name for this file, since UI capabilities change from version to version

• Copy CSS “theme” folderpy– E.g., copy download_folder/css/ui-lightness to

WebContent/css/9

Setting Up Page: Overview

• Load required jQuery UI files– jquery.js (renamed from jquery-1.3.2.min.js)– jquery-ui-1.7.1.custom.min.js

Any custom CSS files your app uses– Any custom CSS files your app uses

• Load your files that use jQuery UI– Any custom JavaScript files your app usesAny custom JavaScript files your app uses– themename/jquery-ui-1.7.1.custom.min.css

10

Page 5: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Setting Up Page: Example

<link rel="stylesheet"href=" /css/ui lightness/jquery ui 1 7 1 custom css"href="./css/ui-lightness/jquery-ui-1.7.1.custom.css"type="text/css"/>

<link rel="stylesheet"href=" /css/sample styles css"href="./css/sample-styles.css"type="text/css"/>

<script src="./scripts/jquery.js"t "t t/j i t"></ i t>type="text/javascript"></script>

<script src="./scripts/jquery-ui-1.7.1.custom.min.js"type="text/javascript"></script>

i t " / i t /j i l j "<script src="./scripts/jquery-ui-examples.js"type="text/javascript"></script>

11

© 2010 Marty Hall

Tabbed Panels withTabbed Panels with Static Content

Customized Java EE Training: http://courses.coreservlets.com/Servlets, JSP, JSF 1.x, JSF 2.0, Struts, Ajax, GWT 2.0, GXT, Spring, Hibernate/JPA, Java 5, Java 6.

Developed and taught by well-known author and developer. At public venues or onsite at your location.

Page 6: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Overview

• IdeaT bb d l h li ki t b h t t i id– Tabbed panel where clicking tabs changes content inside

• HTML– Make a div container to hold the tabs

• <div id="main-tabbed-panel-div">…</div>– Include a ul list containing internal hyperlinks

• <ul><li><a href="#panel1">Go to Panel 1</a></li><li><a href="#panel2">Go to Panel 2</a></li>

</ul>Include divs whose ids match the href values (minus “#”)– Include divs whose ids match the href values (minus # )

• <div id="panel1">Content for panel 1</div><div id="panel2">Content for panel 2</div>

• Basic JavaScriptBasic JavaScript– Call “tabs()” on the div container

• $("#main-tabbed-panel-div").tabs();13

Example: HTML

<div id="static-tabbed-panel-div"><ul><ul><li><a href="#panel1">Panel 1</a></li><li><a href="#panel2">Panel 2</a></li><li><a href="#panel3">Panel 3</a></li>

</ul><div id="panel1"><p>Content for first panel.</p><p>Foo bar baz </p><p>Yadda yadda yadda </p><p>Foo, bar, baz.</p><p>Yadda, yadda, yadda.</p>

</div><div id="panel2"><p>Content for second panel.</p><p>Foo, bar, baz.</p><p>Yadda, yadda, yadda.</p>

</div><div id="panel3">< >C t t f thi d l </ ><p>Content for third panel.</p><p>Foo, bar, baz.</p><p>Yadda, yadda, yadda.</p>

</div></div>14

Page 7: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Example: JavaScript

$(function() {$("# t ti t bb d l di ") t b ()$("#static-tabbed-panel-div").tabs();…

});})

15

Example: Results

16

Page 8: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Options for jQuery UI Widgets

• You can supply anonymous object – Object has optional fields– Fields specify configuration and operational options

Examples• Examples– $("#some-id").tabs();– $("#some-id") tabs({ option1: "foo"$( #some id ).tabs({ option1: foo ,

option2: "bar",option3: "baz" })

N t ili No trailing comma

17

Main Options for tabs({…}) for Static ContentStatic Content

• selected (default: 0)T b b l d i i i ll– Tab to be selected initially

• collapsible (default: false)– Can you click selected tab to hide it (and thus all panels)?Can you click selected tab to hide it (and thus all panels)?

• $("#main-id").tabs({ collapsible: true });

• disabled (default: empty array)A f t b b (0 b d) th t h ld b di bl d– An array of tab numbers (0-based) that should be disabled on startup

• event (default: click)( )– The type of event that should initiate tab selection

• $("#main-id").tabs({ event: "mouseover" });

• fx• fx– Many options for specifying animation when tabs are

selected. See docs for details.18

Page 9: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

© 2010 Marty Hall

Tabbed Panels withTabbed Panels with Dynamic (Ajax) Contenty ( j )

Customized Java EE Training: http://courses.coreservlets.com/Servlets, JSP, JSF 1.x, JSF 2.0, Struts, Ajax, GWT 2.0, GXT, Spring, Hibernate/JPA, Java 5, Java 6.

Developed and taught by well-known author and developer. At public venues or onsite at your location.

Overview

• IdeaT bb d l h li ki b– Tabbed panel where clicking tabs gets server content

• HTML– Make a div container to hold the tabsMake a div container to hold the tabs

• <div id="main-tabbed-panel-div">…</div>– Include a ul list containing external relative hyperlinks

<ul>• <ul><li><a href="url1">Get Content for Panel 1</a></li><li><a href="url2">Get Content for Panel 2</a></li>

</ul>– That’s all!

• Basic JavaScriptC ll “ b ()” h di i– Call “tabs()” on the div container

• $("#main-tabbed-panel-div").tabs();20

Page 10: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Example: HTML

<div id="ajax-tabbed-panel-div"><ul><ul>

<li><a href="time-panel.jsp">Show Time</a></li><li><a href="list-panel.jsp?range=5">

Show Small Numbers</a></li><li><a href="list-panel.jsp?range=500">

Show Big Numbers</a></li></ul></div>

21

Example: JavaScript

$(function() {$("#ajax-tabbed-panel-div") tabs({ collapsible: true });$( #ajax tabbed panel div ).tabs({ collapsible: true });…

});

22

Page 11: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Example: JSP

• time-panel.jsp<h3>It is now <%= new java.util.Date() %></h3>Do you know where your closures are doing?

• list-panel.jspp j p<% double range = 10.0;

try { String r = request.getParameter("range");

I t I t( )range = Integer.parseInt(r);} catch(Exception e) {} %>

<h3>Numbers from 0 to <%= range %></h3><ul><ul><li><%= Math.random() * range %></li><li><%= Math.random() * range %></li><li><%= Math.random() * range %></li><li><%= Math.random() * range %></li><li><%= Math.random() * range %></li>

</ul>23

Example: Results

24

Page 12: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Main Options for tabs({…}) for Ajax ContentAjax Content

• ajaxOptions (default: {})– Any of the options used for $.ajax in first jQuery section

• $("#main-id").tabs({ ajaxOptions: { error: errorHandler }});

• cache (default: false)• cache (default: false)– Should jQuery remember content for previously-selected

tabs? Very helpful if result is always the same for a given y p y gURL.

• spinner (default “<em>Loading…</em>”)T h i b i l f b l d b b f– Text to show in tab title after tab selected but before content is received from server

25

© 2010 Marty Hall

Accordion Panels

Customized Java EE Training: http://courses.coreservlets.com/Servlets, JSP, JSF 1.x, JSF 2.0, Struts, Ajax, GWT 2.0, GXT, Spring, Hibernate/JPA, Java 5, Java 6.

Developed and taught by well-known author and developer. At public venues or onsite at your location.

Page 13: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Overview

• Idea– Horizontally stacked panels with wide tabs

• HTML– Make a div container to hold the tabs

• <div id="main-accordion-panel-div">…</div>

– Include alternating pairs of text with links and contentInclude alternating pairs of text with links and content• <h2><a href="#">Panel 1</a></h2>• <div>Content for Panel 1</div>

<h2>< h f "#">P l 2</ ></h2>• <h2><a href="#">Panel 2</a></h2>• <div>Content for Panel 2</div>

• Basic JavaScriptas c Ja aSc pt– Call “accordion()” on the div container

• $("#main-accordion-panel-div").accordion();27

Example: HTML

<div id="accordion-panel-div"><h2><a href="#">Panel 1</a></h2><h2><a href= # >Panel 1</a></h2><div><p>Content for first panel.</p><p>Foo, bar, baz.</p><p>Yadda, yadda, yadda.</p><p>Foo, bar, baz.</p><p>Yadda, yadda, yadda.</p>

</div><h2><a href="#">Panel 2</a></h2><div><p>Content for second panel.</p><p>Foo, bar, baz.</p><p>Yadda, yadda, yadda.</p>

</div><h2><a href="#">Panel 3</a></h2><div><p>Content for third panel.</p><p>Foo, bar, baz.</p><p>Yadda, yadda, yadda.</p>

</div></div>28

Page 14: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Example: JavaScript

$(function() {$("# di l di ") di ()$("#accordion-panel-div").accordion();…

});})

29

Example: Results

30

Page 15: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Main Options for accordion({…})

• active (default: 0)– Index or selector for initially-selected item

• collapsible, eventC li k hid ? E i l i– Can you click to hide? Event to trigger selection.

– Same as with tabs()

• animated (default: true)• animated (default: true)– Name of jQuery animation to use when showing content

• $("#main-id").accordion({ animated: "fadeIn" });

31

© 2010 Marty Hall

Date Picker

Customized Java EE Training: http://courses.coreservlets.com/Servlets, JSP, JSF 1.x, JSF 2.0, Struts, Ajax, GWT 2.0, GXT, Spring, Hibernate/JPA, Java 5, Java 6.

Developed and taught by well-known author and developer. At public venues or onsite at your location.

Page 16: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Overview

• Idea– Click in textfield to pop up calendar. Choosing day from

calendar puts date string into textfield

• HTML• HTML– Make an input field

• <input type="text" id="date-field"/>p yp

• Basic JavaScript– Call “datepicker()” on the textfield

• $("#date-field").datepicker();

33

Example: HTML

<form action=#"><table>

<tr><td align="right">From: <input type="text"/></td></tr>

<tr><td align="right">/ / /Departure Date: <input type="text" id="start-date"/></td></tr>

<tr><td align="right">To: <input type="text"/></td></tr>

<tr><td align="right">t td a g g tReturn Date: <input type="text" id="end-date"/></td></tr>

<tr><td align="center"><input type="button" value="Show Flights"/>

/<input type="button" value="Show Hotels"/> </td></tr>

</table></form></form>

34

Page 17: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Example: JavaScript

$(function() {$("#start date") datepicker();$("#start-date").datepicker();$("#end-date").datepicker({ changeMonth: true,

numberOfMonths: 2 });…

});

35

Example: Results

36

Page 18: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Main Options for datepicker({ })datepicker({…})

• defaultDate (default: today)I i i ll l d d– Initially selected date

• changeMonth (default: false)changeYear (default: false)changeYear (default: false)– Should jQuery include a dropdown list to let you choose

the month or year?• dayNames (default Sunday Saturday)• dayNames (default Sunday…Saturday)

monthNames (default January…December)– Names to use for the days and months. For other y

languages. There are also various options for short versions of days.

• numberOfMonths (default: 1)numberOfMonths (default: 1)– How many months to show at a time

37

© 2010 Marty Hall

Slider

Customized Java EE Training: http://courses.coreservlets.com/Servlets, JSP, JSF 1.x, JSF 2.0, Struts, Ajax, GWT 2.0, GXT, Spring, Hibernate/JPA, Java 5, Java 6.

Developed and taught by well-known author and developer. At public venues or onsite at your location.

Page 19: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Overview

• Idea– Interactive slider to let user choose numeric values

• Also supports double-handled sliders for choosing ranges

• HTML• HTML– Make a placeholder div

• <div id="div-for-slider"></div>

• Basic JavaScript– Call “slider()” on the div, supply function to be called

when slider moves• $("#div-for-slider").slider({ slide: sliderEventHandler });

– Look up value later– Look up value later• Event handler takes two arguments: event and ui. Use

ui.value to get current slider value39

Example: HTML

<form action="#"><table><table>…

<tr><td align="right">Temperature:

</td><td align="left" width="300">

<div id="slider-div" style="margin-left: 10px"></div>/<div id="temp-display" align="center">32</div>

</td></tr><tr><td align="center" colspan="2">

<input type="button" value="Order Coffee"/><input type= button value= Order Coffee /> </td></tr>

</table></form>/

40

Page 20: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Example: JavaScript

function showTemp(event, ui) {$("#temp display") html(ui value);$("#temp-display").html(ui.value);

}

$(function() {$("#slider-div").slider({ min: 32, max: 212,

slide: showTemp });…

});

41

Example: Results

42

Page 21: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Main Options for slider({…})

• min(default: 0)V l di t l ft t– Value corresponding to left or top

• max– Value corresponding to right or bottom

• slide– Function to call every time value changes. Function takes two

arguments: event and ui object. Use ui.value to get currently g j g yselected value.

• step (default: 1)– Granularity of changesGranularity of changes

• value (default: min)– The initial value

i t ti (d f lt t )• orientation (default: auto)– horizontal or vertical

43

© 2010 Marty Hall

Progress Bar

Customized Java EE Training: http://courses.coreservlets.com/Servlets, JSP, JSF 1.x, JSF 2.0, Struts, Ajax, GWT 2.0, GXT, Spring, Hibernate/JPA, Java 5, Java 6.

Developed and taught by well-known author and developer. At public venues or onsite at your location.

Page 22: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Overview

• IdeaSh f 0% 100%– Shows progress from 0% to 100%

• Output only: does not accept user input

• HTML– Make a placeholder div

• <div id="div-for-progress-bar"></div>

• Basic JavaScript• Basic JavaScript– Call “progressbar()” on the div

• $("#div-for-progress").progressbar();– Have another event that changes values of bar

• Look up value with $("#div-for-progress").progressbar("option", "value");

• Change value with $("#div-for-progress").progressbar("option", "value", num);

45

Example: HTML

<form action="#"><di id " b di "></di ><div id="progressbar-div"></div><input type="button" value="Click 10 Times"

id="progressbar-button"/></form>

46

Page 23: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

Example: JavaScript

function updateProgressBar() {var currentVal =var currentVal = $("#progressbar-div").progressbar("option", "value");

if (currentVal < 100) {currentVal += 10;currentVal + 10;$("#progressbar-div").progressbar("option", "value",

currentVal);}}

}

$(function() {$(function() {$("#progressbar-div").progressbar();$("#progressbar-button").click(updateProgressBar);

…});

47

Example: Results

48

Page 24: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

© 2010 Marty Hall

Wrap-up

Customized Java EE Training: http://courses.coreservlets.com/Servlets, JSP, JSF 1.x, JSF 2.0, Struts, Ajax, GWT 2.0, GXT, Spring, Hibernate/JPA, Java 5, Java 6.

Developed and taught by well-known author and developer. At public venues or onsite at your location.

Summary

• Setup– Load jquery.js, jquery-ui…js and themename/…css

• Ajax tabbed panels– HTML

• <div id="main"><ul><li><a href="relative-url-1">Panel 1</1></li>ul li a href relative url 1 Panel 1 /1 /li

<li><a href="relative-url-2">Panel 2</1></li>…</ul></div>

JavaScript– JavaScript• $("#main").tabs();

• Others– Static tabbed panels, accordion panel, date picker, slider,

progress bar50

Page 25: jjyQuery Part III: Rich Interfaces with jQuery UIcourses.coreservlets.com/Course-Materials/pdf/ajax/jQuery-3-UI.pdf · • Load normal jQuery as before – jQuery UI download gives

© 2010 Marty Hall

Questions?

Customized Java EE Training: http://courses.coreservlets.com/Servlets, JSP, JSF 1.x, JSF 2.0, Struts, Ajax, GWT 2.0, GXT, Spring, Hibernate/JPA, Java 5, Java 6.

Developed and taught by well-known author and developer. At public venues or onsite at your location.