Skip to content
Browse files

[popup docs] Update open() code example

  • Loading branch information...
1 parent 7bdf276 commit 78f114ae57e24759581e4306d91e2364a1c8aa57 @gabrielschulhof gabrielschulhof committed Aug 17, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 docs/pages/popup/index.html
View
10 docs/pages/popup/index.html
@@ -263,12 +263,12 @@ <h3 class="ui-title">Are you sure you want to delete this page?</h3>
<li>If centering the popup over an element would cause the overall height of the document to increase, the popup is shifted upwards at most until its top coordinate becomes 0.</li>
</ol>
- <p>To programmatically make use of the popup's positioning functionality (and any features made available by specifying <code>data-*</code> options on links), pass a jQuery object with the corresponding data items as the third parameter to <code>open()</code>:</p>
+ <p>To programmatically make use of the popup's positioning functionality (and any features made available by specifying <code>data-*</code> options on links), set the corresponding keys in the options object passed to <code>open()</code>:</p>
<code><pre>
-$( ".selector" ).popup( "open", x, y,
- $( {} )
- .jqmData( "position-to", "window" )
- .jqmData( "transition", "slide" ) );
+$( ".selector" ).popup( "open", {
+ positionTo: "window",
+ transition: "slide"
+});
</pre></code>
<p>The above will cause the popup to open and close with a slide transition, and to position itself centered in the window.</p>

0 comments on commit 78f114a

Please sign in to comment.
Something went wrong with that request. Please try again.