I'm rocking this bit of Javascipt in the <head>
section of my page:
<script type="text/javascript">
$(document).ready(function() {
$('dl.expander dd').expander
(
{ slicePoint: 50, widow: 2, expandEffect: 'show', userCollapseText: '[^]' }
);
});
</script>
This works great the first time the page is loaded; however, when I click an <asp:button>
that is inside an <asp:updatepanel>
the page is partially refreshed, but the $(document).ready
is never called again.
This is important, because this Javascript in the $(document).ready
section is collapsing and adding a "readmore" option to a list of pararaphs (or dl's with class="expander") on the page, most of which should be collapsed by default.