javascript - traverse element inside the div -
html:
<div style="width: 260px;margin:25px 0 0 30px"> <input type="checkbox" name="send_email" class="delete_followup" />send email alerts <input type="checkbox" value="delete" type="checkbox" />send sms alerts <button type="submit" name="delete" value="{{follower.id}}" class="delete_follower">delete</button> </div>
js:
$(".delete_followup").click(function(){ var $this = $(this); $(this).find(".delete_follower").show(); });
i want show hidden button on clicking delete_followup
class.i tried above jquery not working.
or try .nextall
:
$(this).nextall(".delete_follower").show();
working here: http://jsfiddle.net/tw5xk/
Comments
Post a Comment