html - jQuery scrolltop for a submit button -
i have submit button after submitting form should scroll id. there other button in form next , should scroll same id.
*jquery*
jquery('.scroll').click(function () { jquery("html, body").animate({ scrolltop: jquery('#blog1').offset().top }, 'slow'); return false; });
html***** ** next , button code *****
<input class="send_btn scroll" type="button" value="back" />
* register button code ******
<input class="send_btn" type="submit" value="register" />
the jquery code working fine next , button. if add scroll class register scolling blog1 form not submitting. if dont add scroll class form submitting not scrolling.
a jsfiddle useful, try this:
<input class="send_btn scroll" type="button" value="register" />
Comments
Post a Comment