I have a clickhandler for a button. I want the screen scrolls to an anchor like
Anchor a = new Anchor();
a.setName("stopHere");
(...)
button.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
// Do somethings
(...)
// Scroll to Anchor "stopHere"
?????
}
});
How can I do it?
This is similar when using an anchor <a href="#stopHere"> click to go to stopHere point </a>
, but I wan do it next the button is clicked.
Thanks.