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:

http://jsfiddle.net/5ugfh/

working more/less toggle:

http://jsfiddle.net/lkj5n/

<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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -