-2

I have a JQuery Dialog box where a long form is in (with scrollbars). When I hit the save button, some messages are displayed at the top of the form. But the dialog is already scrolled down and the user is not able to notice the messages at the top.

How can I scroll up after hitting the save button?

I've seen question jQuery Dialog scroll to element in dialog and How to scroll to specific item using jQuery? but couldn't make it work

Thanks

Community
  • 1
  • 1
MaVRoSCy
  • 17,747
  • 15
  • 82
  • 125
  • So why are the close votes for? I just need the jQuery command to scroll to the top of the Dialog box. Whats so hard in it?? – MaVRoSCy Apr 18 '13 at 14:52

1 Answers1

1

Call

$("elementswithoverflowautoinsidelightbox").animate ({scrollTop: 0});
MaVRoSCy
  • 17,747
  • 15
  • 82
  • 125
fxck
  • 4,898
  • 8
  • 56
  • 94