File Libraries
JQDevelopmentLibrary JQuery – Full
JQDeploymentLibrary JQuery – Compressed
JQGoogleLibrary JQuery – Google
JQUiDevelopmentLibrary JQuery UI – Full
JQUiDeploymentLibrary JQuery UI – Compressed
JQUiGoogleLibrary JQuery UI – Google
How To
Click and Show
html anchor
onClick: (html jQuery: 'div.help') toggle;
with: 'About jQuery'.
html div
class: 'help';
style: 'display: none';
with: 'jQuery is a fast and ...'
Replace a Component
html div
id: (id := html nextId);
with: child.
html anchor
onClick: ((html jQuery id: id) load
html: [ :r |
child := OtherComponent new;
r render: child ]);
with: ‘Change Component’
Update Multiple Elements
html div id: #date.
html div id: #time.
html anchor
onClick: (html jQuery ajax script: [ :s |
s << (s jQuery: #date)
html: [ :r | r render: Date today ].
s << (s jQuery: #time)
html: [ :r | r render: Time now ] ]);
with: ‘Update’
Display a Lightbox
| id |
html div
id: (id := html nextId);
script: (html jQuery new dialog
title: 'Lightbox Dialog';
overlay: (Dictionary new
at: 'background-color' put: '#000';
at: 'opacity' put: 0.75;
yourself);
modal: true);
with: [ self renderDialogOn: html ]
html anchor
onClick: (html jQuery id: id) dialog open;
with: 'Open Lightbox'
0 comments
Post a comment