I have iframed a tumblr blog on a website. I am using scrollpane. See here http://danmccarthy.net/news/
My problem is that the buttons pagination of the blog reload the iframe to the next page but I can't figurate how to scroll to top the parent page once the iframe has reload with the scrollpane implemented.
I tried with out success the following
iframe onload="window.parent.parent.scrollTo(0,0)"
And
$('#exhibit iframe').load(function(){
$(window).scrollTop(0);
});
Below is the scrollpane script for full body scroll
$(function()
{
var win = $(window);
var isResizing = false;
win.bind(
'resize',
function()
{
if (!isResizing) {
isResizing = true;
var container = $('#exhibit');
container.css(
{
'width': 1,
'height': 1
}
);
container.css(
{
'width': win.width(),
'height': win.height()
}
);
isResizing = false;
container.jScrollPane(
{
autoReinitialise: true,
}
);
}
}
).trigger('resize');
$('body').css('overflow', 'hidden');
if ($('#exhibit').width() != win.width()) {
win.trigger('resize');
}
});
And that's the HTML
<div id="wrapper">
<div id="wrap-top">
<!-- Header and Menu -->
</div>
<div id='exhibit'>
<div class='container'>
<div class='right'>
<!-- iframe -->
</div>
</div>
</div>
</div>