Skip to content
This repository
Browse code

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

…as incorrect css
  • Loading branch information...
commit 85e2030ab56959a791976f21c4fd18f16e14c9c9 1 parent f32843c
Jasper de Groot authored August 23, 2012

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  js/jquery.mobile.grid.js
6  js/jquery.mobile.grid.js
@@ -43,13 +43,13 @@ $.fn.grid = function( options ) {
43 43
 			$kids.filter( ":nth-child(" + iterator + "n+2)" ).addClass( "ui-block-b" );
44 44
 		}
45 45
 		if ( iterator > 2 ) {
46  
-			$kids.filter( ":nth-child(3n+3)" ).addClass( "ui-block-c" );
  46
+			$kids.filter( ":nth-child(" + iterator + "n+3)" ).addClass( "ui-block-c" );
47 47
 		}
48 48
 		if ( iterator > 3 ) {
49  
-			$kids.filter( ":nth-child(4n+4)" ).addClass( "ui-block-d" );
  49
+			$kids.filter( ":nth-child(" + iterator + "n+4)" ).addClass( "ui-block-d" );
50 50
 		}
51 51
 		if ( iterator > 4 ) {
52  
-			$kids.filter( ":nth-child(5n+5)" ).addClass( "ui-block-e" );
  52
+			$kids.filter( ":nth-child(" + iterator + "n+5)" ).addClass( "ui-block-e" );
53 53
 		}
54 54
 	});
55 55
 };

0 notes on commit 85e2030

Please sign in to comment.
Something went wrong with that request. Please try again.