|
200 | 200 | <desc>The width of the dialog, in pixels.</desc>
|
201 | 201 | <type name="Number" />
|
202 | 202 | </option>
|
| 203 | + <option name="containment" default="document" example-value="#some_element"> |
| 204 | + <desc> |
| 205 | + If set to <code>some_elemet</code>, the dialog will be unmoveable outside this element (like a div)<br/> |
| 206 | + </desc> |
| 207 | + <longdesc> |
| 208 | + The Value of containment can be a Selector or a Object. |
| 209 | + <pre><code> |
| 210 | + $("#div_dialog").dialog({ |
| 211 | + title: "hello" |
| 212 | + , containment: "#some_div" |
| 213 | + }); |
| 214 | + </code></pre> |
| 215 | + It is the same result than:<br/> |
| 216 | + <pre><code> |
| 217 | + $("#div_dialog").dialog({ |
| 218 | + title: "hello" |
| 219 | + }).dialog("widget").draggable("option", "containment", "#some_div"); |
| 220 | + </code></pre> |
| 221 | + </desc> |
| 222 | + <type name="Selector" /> |
| 223 | + </option> |
| 224 | + <option name="containment" default="document" example-value="#some_element"> |
| 225 | + <desc> |
| 226 | + If set to <code>some_elemet</code>, the dialog will be unmoveable outside this element (like a div)<br/> |
| 227 | + It is the same behavior than:<br/> |
| 228 | + <pre><code> |
| 229 | + $("#div_dialog").dialog({ |
| 230 | + title: "hello" |
| 231 | + }).dialog("widget").draggable("option", "containment", "#some_div"); |
| 232 | + </code></pre> |
| 233 | + </desc> |
| 234 | + <type name="String"> |
| 235 | + <desc> |
| 236 | + The Value of containment can be a ID or some else to select a element. |
| 237 | + <pre><code> |
| 238 | + $("#div_dialog").dialog({ |
| 239 | + title: "hello" |
| 240 | + , containment: "#some_div" |
| 241 | + }); |
| 242 | + </code></pre> |
| 243 | + </desc> |
| 244 | + </type> |
| 245 | + <type name="Object" /> |
| 246 | + <desc> |
| 247 | + The Value of containment can be a Object |
| 248 | + <pre><code> |
| 249 | + var jail = $( '<div id="xxx"></div>' ).css( { |
| 250 | + height: '500px',border: '0px', margin:'0px', width:'500px', position: 'absolute', bottom: '0px', right: '0px', left: '50px', top: '50px' |
| 251 | + } ).appendTo( "body" ), |
| 252 | + $("#div_dialog").dialog({ |
| 253 | + title: "hello" |
| 254 | + , containment: jail |
| 255 | + }); |
| 256 | + </code></pre> |
| 257 | + |
| 258 | + It is the same behavior like:<br/> |
| 259 | + <pre><code> |
| 260 | + $("#div_dialog").dialog({ |
| 261 | + title: "hello" |
| 262 | + }).dialog("widget").draggable("option", "containment", "#some_div"); |
| 263 | + </code></pre> |
| 264 | + </desc> |
| 265 | + </type> |
| 266 | + </option> |
| 267 | + |
203 | 268 | </options>
|
204 | 269 | <events>
|
205 | 270 | <event name="beforeClose">
|
|
0 commit comments