<script type="text/javascript">
$(document).ready(function() {
$('.general').after('<a href="#" class="toggle-link">[Read More]</a>');
$(".general").hide();
$('.toggle-link').click(function(e) {
e.preventDefault();
var $link = $(this);
if ($link.data('expanded') == true) {
$link.data('expanded', false);
$link.text('[Read More]');
} else {
$link.data('expanded', true);
$link.text('[Close]');
}
$link.prev(".general").slideToggle()
});
});
Works very well apart from not adding the heights of the unhidden divs to the overall page height as rendered by the DOM, btw using the above method becasue the results are ina forloop so only want to unhide section by section
any clues please