Saturday 15 September 2012

jquery - How to hide a paragraph of a single div in javascript -


So I have a div, when I expand, and I want to show that its paragraph shows that it spreads So, I tried this Jquery

  $ (document) .ready (function () {$ ('div'). ('Click', function () {if ($ ( This) .height () <$ 450) {$ (this). $ ('P'). Show (); $ (this). And Class ('Extended');} and {$ (this). Removeclass ('extended'); $ (this). $ ('P'). Hide ();}}};});  

Is I doing something wrong in its paragraph Getting it? Sorry for bad english

  $ (document) .ready (function () {$ ('div') ('Click', function () (if ($ (this) .ht () <450) {$ (this & gt; 'p'). Show (); // p this element $ (this ). AddClass ('Extended');} and {$ (.) .removeClass ('Extended'); $ (this & gt; 'p') Hide (); // Here, inside this element P;}});});  

No comments:

Post a Comment