Notifications
Clear all

Not Scrolling to top

9 Posts
2 Users
0 Reactions
2,123 Views
Posts: 8
Topic starter
(@rogerr)
Active Member
Joined: 5 years ago

I have one small issue...

Go to https://www.rosentreter.website/family-tree/

Click on Individuals and scroll to the bottom.

There there is a next page navagation bar... Clicking the Page 2, it loads but does not scroll to the top.

Any ideas??

I have onload set to: aiScrollToTop("gramps_iframe","iframe");aiResizeIframe(this);

Topic Tags
8 Replies
TinyWebGallery
Posts: 925
Admin
(@admin)
Prominent Member
Joined: 16 years ago

Hi,

I just checked. You have set scroll to top to the top of the iframe. And for me it seems to work fine. 

Also onload.... is not needed. 

There is a shortcode setting already: onload_scroll_top="true" or onload_scroll_top="iframe".

In you case the sticky header maybe does make the whole thing looking different.

Best, Michael

 

 

 

Reply
Posts: 8
Topic starter
(@rogerr)
Active Member
Joined: 5 years ago

For my Sticky Header, is there a way for the scroll to add 50px??

 

Also, the nav link at the bottom of the Individuals page still doesn't work. See above^^

Reply
TinyWebGallery
Posts: 925
Admin
(@admin)
Prominent Member
Joined: 16 years ago

You would have to add the 50 px in the ai.js directly. look for aiScrollToTop and there you have to add +50 to the top. 

The pagination does not trigger an onload event. it is Javascript only. To solve this you would need some custom Javascript... OR

you need to use the external workaround. Here you can define the elements which trigger an scroll to top: http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/external-workaround-with-post-message#e51

Best, Michael

 

Reply
Posts: 8
Topic starter
(@rogerr)
Active Member
Joined: 5 years ago

Brilliant support as always thanks Michael.

 

It was actually-50 I needed to add, but thanks for putting me on the right track.

 

The external workaround I can't get to work. The only consistent tags in that section are: li class="paginate_button* and aria-controls="dwr-index-I"

 

The aria-controls are within the link.

 

Can you point me in the right direction or do I need a quote to get some custom JS done 🙂

 

Reply
Page 1 / 2