Column height per class with JavaScript and PHP -
i have following code in script set max height each column. however, intend set max height individually 4 columns per row . won't execute function per class. here's javascript: <script type="text/javascript" > $(document).ready(function() { <?php $test = $cart->count_contents(); ($i=0, $n=$test; $i<$n; $i++) { ?> setheight('.<?php echo 'col'.$i; ?>'); <?php } ?> }); //initialize global variable, store highest height value var maxheight = 0; function setheight(col) { //get element class = col col = $(col); //loop col col.each(function() { //store highest value if($(this).height() > maxheight) { maxheight = $(this).height();; } }); //set height col.height(maxheight); } </script> i pull out each row mysql database php , generate following html: <div class="ui-grid-c ui-bar ui-bar-e"> <div class="ui-block-a"><div class="ui-bar ui-bar-b" style=...