Skip to content

Commit 4a53e25

Browse files
committed
removed space between function and parenthesis
1 parent 76c21d4 commit 4a53e25

22 files changed

+67
-66
lines changed

entries/each.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ $( "li" ).addClass( "bar" );
4444
<example>
4545
<desc>Iterate over three divs and sets their color property.</desc>
4646
<code><![CDATA[
47-
$( document.body ).click(function () {
48-
$( "div" ).each(function ( i ) {
47+
$( document.body ).click(function() {
48+
$( "div" ).each(function( i ) {
4949
if ( this.style.color != "blue" ) {
5050
this.style.color = "blue";
5151
} else {

entries/empty.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ $( ".hello" ).empty();
3131
<example>
3232
<desc>Removes all child nodes (including text nodes) from all paragraphs</desc>
3333
<code><![CDATA[
34-
$( "button" ).click(function () {
34+
$( "button" ).click(function() {
3535
$( "p" ).empty();
3636
});
3737
]]></code>

entries/fadeIn.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ $( "#clickme" ).click(function() {
5050
<example>
5151
<desc>Animates hidden divs to fade in one by one, completing each animation within 600 milliseconds.</desc>
5252
<code><![CDATA[
53-
$( document.body ).click(function () {
53+
$( document.body ).click(function() {
5454
$( "div:hidden:first" ).fadeIn( "slow" );
5555
});
5656
]]></code>
@@ -86,8 +86,8 @@ $( document.body ).click(function () {
8686
<example>
8787
<desc>Fades a red block in over the text. Once the animation is done, it quickly fades in more text on top.</desc>
8888
<code><![CDATA[
89-
$( "a" ).click(function () {
90-
$( "div" ).fadeIn( 3000, function () {
89+
$( "a" ).click(function() {
90+
$( "div" ).fadeIn( 3000, function() {
9191
$( "span" ).fadeIn( 100 );
9292
});
9393
return false;

entries/fadeOut.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ $( "#clickme" ).click(function() {
5555
<example>
5656
<desc>Animates all paragraphs to fade out, completing the animation within 600 milliseconds.</desc>
5757
<code><![CDATA[
58-
$( "p" ).click(function () {
58+
$( "p" ).click(function() {
5959
$( "p" ).fadeOut( "slow" );
6060
});
6161
]]></code>
@@ -75,15 +75,15 @@ $( "p" ).click(function () {
7575
<example>
7676
<desc>Fades out spans in one section that you click on.</desc>
7777
<code><![CDATA[
78-
$( "span" ).click(function () {
79-
$( this ).fadeOut( 1000, function () {
78+
$( "span" ).click(function() {
79+
$( this ).fadeOut( 1000, function() {
8080
$( "div" ).text( "'" + $( this ).text() + "' has faded!" );
8181
$( this ).remove();
8282
});
8383
});
84-
$( "span" ).hover(function () {
84+
$( "span" ).hover(function() {
8585
$( this ).addClass( "hilite" );
86-
}, function () {
86+
}, function() {
8787
$( this ).removeClass( "hilite" );
8888
});
8989
]]></code>

entries/fadeTo.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ $( "#clickme" ).click(function() {
6262
<example>
6363
<desc>Animates first paragraph to fade to an opacity of 0.33 (33%, about one third visible), completing the animation within 600 milliseconds.</desc>
6464
<code><![CDATA[
65-
$( "p:first" ).click(function () {
65+
$( "p:first" ).click(function() {
6666
$( this ).fadeTo( "slow", 0.33 );
6767
});
6868
]]></code>
@@ -79,7 +79,7 @@ Compare to this one that won't fade.
7979
<example>
8080
<desc>Fade div to a random opacity on each click, completing the animation within 200 milliseconds.</desc>
8181
<code><![CDATA[
82-
$( "div" ).click(function () {
82+
$( "div" ).click(function() {
8383
$( this ).fadeTo( "fast", Math.random() );
8484
});
8585
]]></code>
@@ -124,7 +124,7 @@ $( "div" ).click(function () {
124124
var getPos = function( n ) {
125125
return ( Math.floor( n ) * 90) + "px";
126126
};
127-
$( "p" ).each(function ( n ) {
127+
$( "p" ).each(function( n ) {
128128
var r = Math.floor( Math.random() * 3 );
129129
var tmp = $( this ).text();
130130
$( this ).text( $( "p:eq(" + r + ")" ).text() );
@@ -136,7 +136,7 @@ $( "div" ).each(function( n ) {
136136
})
137137
.css( "cursor", "pointer" )
138138
.click( function() {
139-
$( this ).fadeTo( 250, 0.25, function () {
139+
$( this ).fadeTo( 250, 0.25, function() {
140140
$( this )
141141
.css( "cursor", "" )
142142
.prev()

entries/fadeToggle.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
$( "button:first" ).click(function() {
3030
$( "p:first" ).fadeToggle( "slow", "linear" );
3131
});
32-
$( "button:last" ).click(function () {
33-
$( "p:last" ).fadeToggle( "fast", function () {
32+
$( "button:last" ).click(function() {
33+
$( "p:last" ).fadeToggle( "fast", function() {
3434
$( "#log" ).append( "<div>finished</div>" );
3535
});
3636
});

entries/file-selector.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<code><![CDATA[
1616
var input = $( "input:file" ).css({ background:"yellow", border:"3px red solid" });
1717
$( "div" ).text( "For this type jQuery found " + input.length + "." ).css( "color", "red" );
18-
$( "form" ).submit(function () {
18+
$( "form" ).submit(function() {
1919
return false;
2020
}); // so it won't submit
2121
]]></code>

entries/filter.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ $( "li" )
106106
<code><![CDATA[
107107
$( "div" )
108108
.css( "background", "#b4b0da" )
109-
.filter(function ( index ) {
109+
.filter(function( index ) {
110110
return index == 1 || $( this ).attr( "id" ) == "fourth";
111111
})
112112
.css( "border", "3px double red" );

entries/finish.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,37 +23,37 @@ var horiz = $( "#path" ).width() - 20,
2323
vert = $( "#path" ).height() - 20;
2424
2525
var btns = {
26-
bstt: function () {
26+
bstt: function() {
2727
$( "div.box" ).stop( true, true );
2828
},
29-
bs: function () {
29+
bs: function() {
3030
$( "div.box" ).stop();
3131
},
32-
bsft: function () {
32+
bsft: function() {
3333
$( "div.box" ).stop( false, true );
3434
},
35-
bf: function () {
35+
bf: function() {
3636
$( "div.box" ).finish();
3737
},
38-
bcf: function () {
38+
bcf: function() {
3939
$( "div.box" ).clearQueue().finish();
4040
},
41-
bsff: function () {
41+
bsff: function() {
4242
$( "div.box" ).stop( false, false );
4343
},
44-
bstf: function () {
44+
bstf: function() {
4545
$( "div.box" ).stop( true, false );
4646
},
47-
bcs: function () {
47+
bcs: function() {
4848
$( "div.box" ).clearQueue().stop();
4949
}
5050
};
5151
52-
$( "button.b" ).on( "click", function () {
52+
$( "button.b" ).on( "click", function() {
5353
btns[ this.id ]();
5454
});
5555
56-
$( "#go" ).on( "click", function () {
56+
$( "#go" ).on( "click", function() {
5757
$( ".box" )
5858
.clearQueue()
5959
.stop()

entries/first-child-selector.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
<code><![CDATA[
1515
$( "div span:first-child" )
1616
.css( "text-decoration", "underline" )
17-
.hover(function () {
17+
.hover(function() {
1818
$( this ).addClass( "sogreen" );
19-
}, function () {
19+
}, function() {
2020
$( this ).removeClass( "sogreen" );
21-
});
21+
});
2222
]]></code>
2323
<css><![CDATA[
2424
span {

entries/focus.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ $( "#other" ).click(function() {
6666
}
6767
]]></css>
6868
<code><![CDATA[
69-
$( "input" ).focus(function () {
69+
$( "input" ).focus(function() {
7070
$( this ).next( "span" ).css( "display", "inline" ).fadeOut( 1000 );
7171
});
7272
]]></code>

entries/height.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ $( document ).height(); // returns height of HTML document
2828
function showHeight( ele, h ) {
2929
$( "div" ).text( "The height for the " + ele + " is " + h + "px." );
3030
}
31-
$( "#getp" ).click(function () {
31+
$( "#getp" ).click(function() {
3232
showHeight( "paragraph", $( "p" ).height() );
3333
});
34-
$( "#getd" ).click(function () {
34+
$( "#getd" ).click(function() {
3535
showHeight( "document", $( document ).height() );
3636
});
37-
$( "#getw" ).click(function () {
37+
$( "#getw" ).click(function() {
3838
showHeight( "window", $( window ).height() );
3939
});
4040
]]></code>
@@ -96,7 +96,7 @@ $( "#getw" ).click(function () {
9696
<example>
9797
<desc>To set the height of each div on click to 30px plus a color change.</desc>
9898
<code><![CDATA[
99-
$( "div" ).one( "click", function () {
99+
$( "div" ).one( "click", function() {
100100
$( this ).height( 30 ).css({
101101
cursor: "auto",
102102
backgroundColor: "green"

entries/hide.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ $( "#clickme" ).click(function() {
6161
<desc>Hides all paragraphs then the link on click.</desc>
6262
<code><![CDATA[
6363
$( "p" ).hide();
64-
$( "a" ).click(function ( event ) {
64+
$( "a" ).click(function( event ) {
6565
event.preventDefault();
6666
$( this ).hide();
6767
});
@@ -75,7 +75,7 @@ $( "a" ).click(function ( event ) {
7575
<example>
7676
<desc>Animates all shown paragraphs to hide slowly, completing the animation within 600 milliseconds.</desc>
7777
<code><![CDATA[
78-
$( "button" ).click(function () {
78+
$( "button" ).click(function() {
7979
$( "p" ).hide( "slow" );
8080
});
8181
]]></code>
@@ -94,13 +94,13 @@ $( "button" ).click(function () {
9494
<example>
9595
<desc>Animates all spans (words in this case) to hide fastly, completing each animation within 200 milliseconds. Once each animation is done, it starts the next one.</desc>
9696
<code><![CDATA[
97-
$( "#hidr" ).click(function () {
98-
$( "span:last-child" ).hide( "fast", function () {
97+
$( "#hidr" ).click(function() {
98+
$( "span:last-child" ).hide( "fast", function() {
9999
// use callee so don't have to name the function
100100
$( this ).prev().hide( "fast", arguments.callee );
101101
});
102102
});
103-
$( "#showr" ).click(function () {
103+
$( "#showr" ).click(function() {
104104
$( "span" ).show( 2000 );
105105
});
106106
]]></code>
@@ -127,8 +127,8 @@ $( "#showr" ).click(function () {
127127
for ( var i = 0; i < 5; i++ ) {
128128
$( "<div>" ).appendTo( document.body );
129129
}
130-
$( "div" ).click(function () {
131-
$( this ).hide( 2000, function () {
130+
$( "div" ).click(function() {
131+
$( this ).hide( 2000, function() {
132132
$( this ).remove();
133133
});
134134
});

entries/hover.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ $( selector ).mouseenter( handlerIn ).mouseleave( handlerOut );
2525
<desc>To add a special style to list items that are being hovered over, try:</desc>
2626
<code><![CDATA[
2727
$( "li" ).hover(
28-
function () {
28+
function() {
2929
$( this ).append( $( "<span> ***</span>" ) );
30-
}, function () {
30+
}, function() {
3131
$( this ).find( "span:last" ).remove();
3232
}
3333
);
@@ -63,9 +63,9 @@ $( "li.fade" ).hover(function() {
6363
<desc>To add a special style to table cells that are being hovered over, try:</desc>
6464
<code><![CDATA[
6565
$( "td" ).hover(
66-
function () {
66+
function() {
6767
$( this ).addClass( "hover" );
68-
}, function () {
68+
}, function() {
6969
$( this ).removeClass( "hover" );
7070
}
7171
);
@@ -105,10 +105,10 @@ $( "li" )
105105
.end()
106106
.filter( ":even" )
107107
.hover(
108-
function () {
108+
function() {
109109
$( this ).toggleClass( "active" ).next().stop( true, true ).slideToggle();
110110
}
111-
);
111+
);
112112
]]></code>
113113
<css><![CDATA[
114114
ul {

entries/html.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ $( "div.demo-container" ).html();
2828
<example>
2929
<desc>Click a paragraph to convert it from html to text.</desc>
3030
<code><![CDATA[
31-
$( "p" ).click(function () {
31+
$( "p" ).click(function() {
3232
var htmlStr = $( this ).html();
3333
$( this ).text( htmlStr );
3434
});

entries/index.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ alert( "Index: " + $( "#bar" ).index() );
8181
<example>
8282
<desc>On click, returns the index (based zero) of that div in the page.</desc>
8383
<code><![CDATA[
84-
$( "div" ).click(function () {
84+
$( "div" ).click(function() {
8585
// this is the dom element clicked
8686
var index = $( "div" ).index( this );
8787
$( "span" ).text( "That was div index #" + index );

entries/input-selector.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $( "#messages" ).text( "Found " + allInputs.length + " inputs and the form has "
1919
formChildren.length + " children." );
2020
2121
// so it won't submit
22-
$( "form" ).submit(function () {
22+
$( "form" ).submit(function() {
2323
return false;
2424
});
2525
]]></code>

entries/is.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ $( "li" ).click(function() {
7878
<example>
7979
<desc>Shows a few ways is() can be used inside an event handler.</desc>
8080
<code><![CDATA[
81-
$( "div" ).one( "click", function () {
81+
$( "div" ).one( "click", function() {
8282
if ( $( this ).is( ":first-child" ) ) {
8383
$( "p" ).text( "It's the first div." );
8484
} else if ( $( this ).is( ".blue,.red" ) ) {

entries/jQuery.ajax.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,15 @@ $.ajax();
185185
<pre><code>
186186
$.ajax({
187187
url: "http://fiddle.jshell.net/favicon.png",
188-
beforeSend: function ( xhr ) {
188+
beforeSend: function( xhr ) {
189189
xhr.overrideMimeType( "text/plain; charset=x-user-defined" );
190190
}
191-
}).done(function ( data ) {
192-
if( console &amp;&amp; console.log ) {
193-
console.log( "Sample of data:", data.slice( 0, 100 ) );
194-
}
195-
});
191+
})
192+
.done(function( data ) {
193+
if( console &amp;&amp; console.log ) {
194+
console.log( "Sample of data:", data.slice( 0, 100 ) );
195+
}
196+
});
196197
</code></pre>
197198
<p>The jqXHR objects returned by <code>$.ajax()</code> as of jQuery 1.5 implement the Promise interface, giving them all the properties, methods, and behavior of a Promise (see <a href="/category/deferred-object/">Deferred object</a> for more information). These methods take one or more function arguments that are called when the <code>$.ajax()</code> request terminates. This allows you to assign multiple callbacks on a single request, and even to assign callbacks after the request may have completed. (If the request is already complete, the callback is fired immediately.) Available Promise methods of the jqXHR object include: </p>
198199
<ul>

entries/jQuery.dequeue.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
<example>
1919
<desc>Use jQuery.dequeue() to end a custom queue function which allows the queue to keep going.</desc>
2020
<code><![CDATA[
21-
$( "button" ).click(function () {
21+
$( "button" ).click(function() {
2222
$( "div" ).animate({ left: '+=200px' }, 2000 );
2323
$( "div" ).animate({ top: '0px' }, 600 );
24-
$( "div" ).queue(function () {
24+
$( "div" ).queue(function() {
2525
$( this ).toggleClass( "red" );
2626
$.dequeue( this );
2727
});

0 commit comments

Comments
 (0)