Skip to content

Commit f6853ad

Browse files
committed
remove some trailing whitespace in a few places that's breaking yaml parsing, move events.md into content dir
1 parent fc9e648 commit f6853ad

File tree

4 files changed

+22
-24
lines changed

4 files changed

+22
-24
lines changed

content/about-jquery.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
---
1+
---
22
title: About jQuery
33
filename: about-jquery-foo.html
44
---
55

6-
Getting started with jQuery can be easy or challenging, depending on
6+
Getting started with jQuery can be easy or challenging, depending on
77
your experience with JavaScript, HTML, CSS, and programming concepts in general.
File renamed without changes.

content/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: The jQuery Learning Site
33
---
44

content/plugins/advanced_plugin_concepts.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
2-
title: Advanced Plugin Concepts
3-
status: needswork
4-
editrequired: 2
2+
title: Advanced Plugin Concepts
53
---
64

75
### Provide public access to default plugin settings
@@ -299,15 +297,15 @@ Notice that we've created a reference to the injected wrapper and we're also cal
299297

300298
<javscript>
301299
var defaults = {
302-
300+
303301
wrapperAttrs : {
304302
id : 'gallery-wrapper'
305303
},
306-
304+
307305
// ... rest of settings ...
308-
306+
309307
};
310-
308+
311309
// We can use the extend method to merge options/settings as usual:
312310
// But with the added first parameter of TRUE to signify a DEEP COPY:
313311
var settings = $.extend(true, {}, defaults, options);
@@ -321,13 +319,13 @@ The same model can be used to let the user define CSS styles:
321319

322320
<javascript>
323321
var defaults = {
324-
322+
325323
wrapperCSS : {},
326-
324+
327325
// ... rest of settings ...
328-
326+
329327
};
330-
328+
331329
// Later on in the plugin where we define the wrapper:
332330
var $wrapper = $('<div />')
333331
.attr(settings.wrapperAttrs)
@@ -345,19 +343,19 @@ If your plugin is driven by events then it might be a good idea to provide a cal
345343

346344
<javascript>
347345
var defaults = {
348-
346+
349347
onImageShow : function(){}, // we define an empty anonymous function
350348
// so that we don't need to check its
351349
// existence before calling it.
352-
350+
353351
// ... rest of settings ...
354-
352+
355353
};
356-
354+
357355
// Later on in the plugin:
358-
356+
359357
$nextButton.bind('click', showNextImage);
360-
358+
361359
function showNextImage() {
362360
// DO stuff to show the image here...
363361
// ...
@@ -370,15 +368,15 @@ Instead of initiating the callback via traditional means (adding parenthesis) we
370368

371369
<javascript>
372370
$('ul.imgs li').superGallery({
373-
371+
374372
onImageShow : function() {
375373
$(this)
376374
.after('<span>' + $(this).attr('longdesc') + '</span>');
377375
},
378-
376+
379377
// ... other options ...
380378
// ...
381-
379+
382380
});
383381
</javascript>
384382

@@ -392,4 +390,4 @@ Your plugin is not going to be able to work in every situation. And equally, it'
392390

393391
- *Flexibility*: How many situations will your plugin be able to deal with?
394392
- *Size*: Does the size of your plugin correspond to its level of functionality? I.e. Would you use a very basic tooltip plugin if it was 20k in size? - Probably not!
395-
- *Performance*: Does your plugin heavily process the options in any way? Does this effect speed? Is the overhead caused worth it for the end user?
393+
- *Performance*: Does your plugin heavily process the options in any way? Does this effect speed? Is the overhead caused worth it for the end user?

0 commit comments

Comments
 (0)