Jquery/JS whiz?
- Started
- Last post
- 25 Responses
- robot520
if there are only 2 boxes per row, write a loop that compares the heights of the even-th and odd-th. adjust the heights to whichever has the greatest.
- Noggin0
The page may contain like 20 boxes (say 10 rows each with 2 boxes in), that will probably be generated from a database so giving each box an id/class name wont work.
- acescence0
you could just give them different classes and target them separately
$(".block").equalHeights();
$(".block2").equalHeights(800);
$(".block3").equalHeights(100,50...
etc..
- Noggin
I posted a question regarding an age old problem with equal height divs last week without a decent solution.
http://www.qbn.com/topics/639225…
I found some jquery code that will do it elegantly with one issue - it wont work for multiple rows. It will set ALL the divs to the same height as opposed to a 'per row' basis.
http://www.cssnewbie.com/example…
Any whiz out there who can change it from an 'id' solution to a parent/child solution?