I have a problem sliding the class up / down in my project and would appreciate any help.
HTML:
& lt; Input type = "text" class = "text" name = "left" style = "width: 100%;" /> & Lt; Input type = "submit" class = "btn" value = "submit" /> & Lt; Div class = "regler" & gt; Regular & lt; / Div & gt; jquery:
$ ("input.text"). Focus (function {$ (this) .mate ({width: '80 $ '},' slow ', function () {$ (this) .next (' input.btn '). Fidin (' slow ') ;}); $ (This) .next ("Regler") Slidedown ('slow');}); $ ("Input.text"). Fade ('function'), {$ (this) .next ('input.btn'). Feeds ('slow', function () {$ (this) .prev (). Animate ({width: '100%'}, 'Slow');}); $ (this) .next (".regler") SlideUp ('Slow');}); CSS:
.regler {display: none; } Input.btn {display: none; } jQuery script is located in the tags after HTML.
$ (this) .next (". Regler"). Slide Down ('Slow' '); and $ (this) .next ("Regler"). SlideUp ('Slow'); The only rows that do not work.
Thanks for the reply, Victor.
next only the next element since this Your reference has a textbox, it does not have any next .regler If these tags are wrapped in parent containers, try it:
$ (this) .siblings (".global"). SlideUp ('Slow'); Or, if you have multiple sets of inputs:
$ (this) .next (). Next ("Regler"). SlideUp ('Slow');
Comments
Post a Comment