Skip to content

Commit

Permalink
separating var declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
mstrutt committed Nov 15, 2015
1 parent 1db3d35 commit 137a22f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions feature-detects/css/nthchild.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ define(['Modernizr', 'testStyles'], function(Modernizr, testStyles) {
// A Javascript loop then tests if the `<div>`s have the expected width
// using the modulus operator.
testStyles('#modernizr div {width:1px} #modernizr div:nth-child(2n) {width:2px;}', function(elem) {
var elems = elem.getElementsByTagName('div'),
correctWidths = true;
var elems = elem.getElementsByTagName('div');
var correctWidths = true;

for (var i = 0; i < 5; i++) {
correctWidths = correctWidths && elems[i].offsetWidth === i % 2 + 1;
Expand Down

0 comments on commit 137a22f

Please sign in to comment.