javascript - jQuery scrollIntoView scroll more px -
would there chance can use scrollintoview 100 pixel target element
document.getelementbyid("container").scrollintoview(true);
this scroll top of iframe element, cross-domain issue not able select element outside iframe. appreciate if suggest other solution fix this, please?
<html> <body> <header><h1>test header</h1></header> <div id="container"> test text </div> <iframe> <button>click top of parent body</button> <iframe>
i have tried document.getelementbyid("container").scrolltop += 200;
not working me.
Comments
Post a Comment