I am no programmer so I’m sure this can be answered rather easily:
How can I alter this jQuery script to either:
- Divide the new height by 2
AND/OR
-
Only calculate the height of the first element inside of the div?
$( document ).ready(function() { $( "#left-sidebar-inner" ).each(function() { var newHeight = 0, $this = $( this ); $.each( $this.children(), function() { newHeight += $( this ).height(); }); $this.height( newHeight ); }); });
Both answers would be great! Thanks in advance!
not sure what you mean about the second part you would have to post the corresponding html