jquery css question i have

JavaScript performance comparison

Test case created

Preparation code

<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>
<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 s = window.getComputedStyle || function(e){ return e.currentStyle };
   var a = s(area[0]);
   var thing = { h: a["height"], w: a["width"], b:   a["border"]};
   
}
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