scroll the content of a IFRAME
I have a frame on which I am loading a website, for example yahoo.com. Now the question is i don't want want the default scrollbar. i have two links like 'UP' and 'DOWN' for scrolling the content.
Can you please let me know how can achieve this.
The Code goes like this
<html>
<body>
<div id="previewBack">
<div id="previewWrapper">
<iframe src="http://www.qrr.mobi/?q=uelqqbvi" frameborder="0" id="frame"
onmouseover="this.className='scroll'" onmouseout="this.className='noscroll'"
class="noscroll"></iframe>
</div>
<a开发者_开发知识库 href="#">UP</a><a href="#">DOWN</a>
</div>
</body>
<html>
jScrollPane will do that.
http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html
The Demo page shows some "ScrollTo" links like the ones you're asking about...
http://www.kelvinluck.com/assets/jquery/jScrollPane/scrollTo.html
EDIT:
You're using jQuery, so you don't need the inline JavaScript "onmouseover, etc." within your iFrame element.
You need to have the following in the CSS for the iframe class, in order to have the vertical scroll bars go away:
.noscroll{
clear:both;
overflow:hidden;
}
精彩评论