Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Grid: Fixes #4835 - grid with more than 2 columns and multiple rows h…

…as incorrect css
  • Loading branch information...
commit 85e2030ab56959a791976f21c4fd18f16e14c9c9 1 parent f32843c
@jaspermdegroot jaspermdegroot authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 js/jquery.mobile.grid.js
View
6 js/jquery.mobile.grid.js
@@ -43,13 +43,13 @@ $.fn.grid = function( options ) {
$kids.filter( ":nth-child(" + iterator + "n+2)" ).addClass( "ui-block-b" );
}
if ( iterator > 2 ) {
- $kids.filter( ":nth-child(3n+3)" ).addClass( "ui-block-c" );
+ $kids.filter( ":nth-child(" + iterator + "n+3)" ).addClass( "ui-block-c" );
}
if ( iterator > 3 ) {
- $kids.filter( ":nth-child(4n+4)" ).addClass( "ui-block-d" );
+ $kids.filter( ":nth-child(" + iterator + "n+4)" ).addClass( "ui-block-d" );
}
if ( iterator > 4 ) {
- $kids.filter( ":nth-child(5n+5)" ).addClass( "ui-block-e" );
+ $kids.filter( ":nth-child(" + iterator + "n+5)" ).addClass( "ui-block-e" );
}
});
};
Please sign in to comment.
Something went wrong with that request. Please try again.