javascript - Toggle Text with Jquery with Text Displays -
i using jquery toggle display on p tags. when "more" clicked of text displayed. want click listener "less" when content has been displayed. @ point says "more" time. need change "more" "less" on toggle. have been able achieve removing classes allow text shown , hidden, defeats purpose because it's functionality care about.
working text display:
working more/less toggle:
<p> please </p>
thanks in advance.
just comment out h3
hiding logic (from first fiddle):
//$("#moretext").click(function () { // $('h3', this).toggle(); //});
check if works: http://jsfiddle.net/5ugfh/1/
Comments
Post a Comment