Skip to content

Commit 9c56c11

Browse files
committed
Demo for styles
1 parent aaad83c commit 9c56c11

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,11 @@ $("#foo").styles('float','display')
312312
// -> { cssFloat: "left", display: "block" }
313313
{% endhighlight %}
314314

315+
The following example implements a `fastHeight` jQuery plugin which uses `$.fn.styles` to calculate the element height and compares
316+
the runtime to the equivalent [jQuery.height](http://api.jquery.com/height/):
317+
318+
<iframe style="width: 100%; height: 250px" src="http://jsfiddle.net/6CcaG/embedded/result,html,js,css" allowfullscreen="allowfullscreen" frameborder="0">JSFiddle</iframe>
319+
315320
## within `$(el).within(left, top, [useOffsetCache]) -> jQuery`
316321

317322
[jQuery.within](http://donejs.com/docs.html#!jQuery.within) adds `$.fn.within` and `$.fn.withinBox` that return all elements having a given position or area in common. The following example returns all `div` elements having the point 200px left and 200px from the top in common:

0 commit comments

Comments
 (0)