Scrolling webpage using jquery onclick to a div
I have form on html and submitting the form using below code
<div class="submit-clear">
<input id="generate" type="submit" name="script" value="create"/>
</div>
The form data will be displayed on a separate div at bottom of the hash
tag page #output
output section div id is
<div id="output-main">
<-------output of the form data will be displayed here---->
</div>
Once the user submit the form, I need to scroll the webpage to the <div
id="output-main"> section to display the output. After searching previous
question, I got below solution, but its not working for me.Please help me
here
$('#generate').click(function() {
$.scrollTo($('#output-main'), 500);
});
No comments:
Post a Comment