I have only one page, say 5 posts, all in     Now, I have The structure is 5-6 times above the same page, and whenever I click on               I How do I modify only for the expansion of that particular post?          Your click should affect the   Also this line    should be   Unless    Code          #article . The following jQuery code used to toggle the hidden / show is:   
 $ ("Click-show-more"). Click here (function () (if ($ (".content"). Halcus ("show-more") {$ (this) .text ("show less"); and {$ (this) .text ("Show more");} $ ("content.") .toggleClass ("show-more");});    HTML  structure   Show more , all 5-6 posts are elaborate. I   < P>    
 $ (". material"). $ (This) .closest ('article'). ('. material'). FindClass ("show-more")    content of particular article  then  this  Use context.   
 $ ("content"). ToggleClass ("show-more");    $ (this) .clostest ('article'). ('. Content') Toggle ();   . Show-more {display: none}  is already defined. Click   
 $ (". Click-show-more") (function () {var $ closestContent = $ (this ) .closest ('article'). ('$ Content'); if ($ closest content. Haas class ("show-more")) {$ (this). Text ("(show less");} And {$ (this). Text ("Show more");} $ nearby content- toggleClass ('show-more');});   
 
No comments:
Post a Comment