jquery css question i have

JavaScript performance comparison

Revision 2 of this test case created

Preparation code

<style type="text/css">
textarea
{
   height: 20px;
}
</style>

<textarea style=" width: 20px; border: solid 4px yellow;"></textarea>
<textarea style=" width: 20px; border: solid 4px yellow;"></textarea>
<textarea style=" width: 20px; border: solid 4px yellow;"></textarea>
<textarea style=" width: 20px; border: solid 4px yellow;"></textarea>
<textarea style=" width: 20px; border: solid 4px yellow;"></textarea>
<textarea style=" width: 20px; border: solid 4px yellow;"></textarea>
<textarea style=" width: 20px; border: solid 4px yellow;"></textarea>
<textarea style=" width: 20px; border: solid 4px yellow;"></textarea>
<textarea style=" width: 20px; border: solid 4px yellow;"></textarea>
<textarea style=" width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<textarea style="height: 10px; width: 20px; border: solid 4px yellow;"></textarea>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

 

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
individual
var areas = $('textarea');

for(var i = 0; i < areas.length; i++)
{
   var area = $(areas[i]);
   var thing = { h: area.css('height'), w: area.css('width'), b:   area.css('border')};
   
}
pending…
array
var areas = $('textarea');

for(var i = 0; i < areas.length; i++)
{
   var area = $(areas[i]);
   var a = area.css(["height", "width", "border"]);
   var thing = { h: a[0], w: a[1], b:   a[2]};
   
}
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment