Skip to content

Commit bc776de

Browse files
committed
More demos
1 parent 9c56c11 commit bc776de

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ The following *options* are available:
173173
* `path` - the value of the path for the cookie
174174
* `secure` - if the cookie requires HTTPS
175175

176+
The example uses `jQuery.cookie` and [formParams](#formParams) to persist a form to a cookie. You can save the form
177+
or load it from the value stored in the cookie. At the bottom it shows the current cookie value after running it through
178+
`decodeURIComponent`:
179+
180+
<iframe style="width: 100%; height: 500px" src="http://jsfiddle.net/wMN7G/embedded/result,html,js,css" allowfullscreen="allowfullscreen" frameborder="0">JSFiddle</iframe>
181+
176182
## dimensions
177183

178184
[jQuery.dimensions](http://donejs.com/docs.html#!jQuery.dimensions) overwrites `$.fn.innerWidth`, `$.fn.outerWidth`, `$.fn.innerHeight`, `$.fn.outerHeight` and enables `$.fn.animate` to animate these values. Inner dimensions include the padding where outer dimensions also take care of borders and margins (if *includeMargin* is set to `true`). Set and read these values using:
@@ -227,6 +233,10 @@ $('form').formParams({
227233
});
228234
{% endhighlight %}
229235

236+
Update the form in the following example to see a JSON representation of the object returned by `$.fn.formParams`:
237+
238+
<iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/xJLvn/embedded/result,html,js,css" allowfullscreen="allowfullscreen" frameborder="0">JSFiddle</iframe>
239+
230240
## range `$.Range([el]) -> range` `$(el).range() -> range`
231241

232242
Use [jQuery.Range](http://donejs.com/docs.html#!jQuery.Range) to create, move and compare text ranges. Use `$.Range.current()` to get the currently selected text range. `$(el).range()` returns a text range on an element.

0 commit comments

Comments
 (0)