Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
The place for more technical questions for those who want to create new pagetypes or bespoke functionality.
  • Page:
  • 1

TOPIC:

Fragment identifiers and scroll functions 7 years 4 months ago #4578

  • Neil Pollock
  • Neil Pollock's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 92
  • Thank you received: 4
I am using a scroll function in a bootstrap template to show a full page title screen for different sections. You can see this here:

xerte.cardiff.ac.uk/play_5683

However, if I give the link to a specific page the scroll function no longer works. For example:

xerte.cardiff.ac.uk/play_5683#page4

Does anyone have an idea why this would be?

Please Inloggen or Create an account to join the conversation.

Fragment identifiers and scroll functions 7 years 4 months ago #4585

  • Fay
  • Fay's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 229
  • Thank you received: 92
Hi Neil

Where have you put the code that controls the way that you want those titles screens to work (the code that makes it full screen but then shrinks it as you scroll down)?

Is it in one of the sections on the first page? If so then this won't have loaded when skipping directly to a later page so your title page won't work as expected.

There is a script optional property at LO level (click on 1st item in page tree where you've entered your LO title & add 'Script' optional property here). It may better when added here

Fay

Please Inloggen or Create an account to join the conversation.

Fragment identifiers and scroll functions 7 years 4 months ago #4586

  • Fay
  • Fay's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 229
  • Thank you received: 92
Just thought - I think the LO level Script optional property might be a reasonably recent addition so if you don't have the option to add it here you might have to have the script in your 1st page duplicated on all subsequent pages to make sure it works when navigating directly to a page.

I hope this helps
Fay
The following user(s) said Thank You: Neil Pollock

Please Inloggen or Create an account to join the conversation.

Fragment identifiers and scroll functions 7 years 4 months ago #4587

  • Neil Pollock
  • Neil Pollock's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 92
  • Thank you received: 4
Thanks for this, Fay.

The problem was indeed that I had the script on the first page and it wasn't being loaded (and as soon as you said it it seemed so obvious!).

I don't seem to have the script optional property at LO level yet, so I've just copied it across to the other pages as necessary.

Thanks.

Please Inloggen or Create an account to join the conversation.

  • Page:
  • 1
Moderators: JohnSmith
Time to create page: 0.076 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search