You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Chapters/17-JQuery/jquery.pillar
+26-13Lines changed: 26 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -225,7 +225,7 @@ Searches for all elements that match the specified expression.
225
225
aQuery find: 'div'.
226
226
]]]
227
227
228
-
!! Parents
228
+
!!!! Parents
229
229
230
230
Get a set of elements containing the unique parents of the matched set of elements.
231
231
@@ -263,37 +263,50 @@ There is a wide variety of actions that come supported with jQuery. jQuery UI an
263
263
264
264
The following examples add, remove or toggle the CSS class ==important== given as the first argument. These methods are commonly used to change the appearance of one or more HTML elements for example to visualize a state change in the application.
265
265
266
-
==aQuery addClass: 'important'.
267
-
==aQuery removeClass: 'important'.
268
-
==aQuery toggleClass: 'important'.
266
+
[[[
267
+
aQuery addClass: 'important'.
268
+
aQuery removeClass: 'important'.
269
+
aQuery toggleClass: 'important'.
270
+
]]]
269
271
270
272
Also you can query if a particular class is set:
271
273
272
-
==aQuery hasClass: 'important'.
274
+
[[[
275
+
aQuery hasClass: 'important'.
276
+
]]]
277
+
273
278
274
279
!!!! Styles
275
280
276
281
Similarly you can change the style of one or more HTML elements. By providing a dictionary you can change multiple CSS styles at once:
277
282
278
-
==aQuery css: aDictionary.
283
+
[[[
284
+
aQuery css: aDictionary.
285
+
]]]
279
286
280
287
Alternatively you can use a dictionary-like protocol to read and write specific style properties:
281
288
282
-
==aQuery cssAt: 'color'.
283
-
==aQuery cssAt: 'color' put: '#ff0'.
289
+
[[[
290
+
aQuery cssAt: 'color'.
291
+
aQuery cssAt: 'color' put: '#ff0'.
292
+
]]]
284
293
285
294
Note that in most cases it is preferred to use CSS classes instead of hardcoding your style settings into the application code.
286
295
287
296
!!!! Attributes
288
297
289
298
While the above methods change the ==class== and ==style== attribute of one or more DOM elements, there are also accessor methods to change arbitrary HTML attributes. By providing a dictionary of key-value pairs you can change multiple attributes at once:
290
299
291
-
==aQuery attributes: aDictionary.
300
+
[[[
301
+
aQuery attributes: aDictionary.
302
+
]]]
292
303
293
304
Alternatively you can use a dictionary-like protocol to read and write attributes:
Copy file name to clipboardExpand all lines: book.pillar
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
-
${inputFile:Chapters/Introduction.pillar}$
1
+
%${inputFile:Chapters/Introduction.pillar}$
2
2
3
3
! Getting Started
4
4
This part shows you how to get a simple Seaside application up and running
5
5
in less than 15 minutes. If you’re new to Pharo, have a look at the Pharo by Example Seaside Chapter. You can also have a look at the excellent Pharo Mooc *http://mooc.pharo.org*. Watch the first video and the development session about the counter.
0 commit comments