Skip to content

Commit 826bb6a

Browse files
committed
Event Object category: Fixed spacing in code blocks.
1 parent 32a3ee6 commit 826bb6a

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

categories.xml

+17-21
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,22 @@
9999
<p>The <code>jQuery.Event</code> constructor is exposed and can be used when calling <a href="/trigger">trigger</a>. The <code>new</code> operator is optional.</p>
100100
<p>Check <a href="/trigger">trigger</a>'s documentation to see how to combine it with your own event object.</p>
101101
<p>Example:</p>
102-
<pre>
103-
<code>//Create a new jQuery.Event object without the "new" operator.
104-
var e = jQuery.Event("click");
102+
<pre><code>
103+
//Create a new jQuery.Event object without the "new" operator.
104+
var e = jQuery.Event( "click" );
105105
106-
// trigger an artificial click event
107-
jQuery("body").trigger( e );
108-
</code>
109-
</pre>
106+
// trigger an artificial click event
107+
jQuery( "body" ).trigger( e );
108+
</code></pre>
110109
<p>As of jQuery 1.6, you can also pass an object to <code>jQuery.Event()</code> and its properties will be set on the newly created Event object.</p>
111110
<p>Example:</p>
112-
<pre>
113-
<code> // Create a new jQuery.Event object with specified event properties.
114-
var e = jQuery.Event("keydown", { keyCode: 64 });
111+
<pre><code>
112+
// Create a new jQuery.Event object with specified event properties.
113+
var e = jQuery.Event( "keydown", { keyCode: 64 } );
115114
116-
// trigger an artificial keydown event with keyCode 64
117-
jQuery("body").trigger( e );
118-
</code>
119-
</pre>
115+
// trigger an artificial keydown event with keyCode 64
116+
jQuery( "body" ).trigger( e );
117+
</code></pre>
120118
<h4>Event Properties</h4>
121119
<p>jQuery normalizes the following properties for cross-browser consistency:</p>
122120
<ul>
@@ -144,13 +142,11 @@
144142
<h4>OtherProperties</h4>
145143
<p>Certain events may have properties specific to them. Those can be accessed as properties of the <code>event.originalEvent</code> object.</p>
146144
<p>Example:</p>
147-
<pre>
148-
<code>
149-
// add the dataTransfer property for use with the native `drop` event
150-
// to capture information about files dropped into the browser window
151-
jQuery.event.props.push("dataTransfer");
152-
</code>
153-
</pre>
145+
<pre><code>
146+
// add the dataTransfer property for use with the native `drop` event
147+
// to capture information about files dropped into the browser window
148+
jQuery.event.props.push( "dataTransfer" );
149+
</code></pre>
154150
</div>
155151
]]></desc>
156152
</category>

0 commit comments

Comments
 (0)