wpengine

wpengine

Welcome, Guest
Username: Password: Remember me

TOPIC: Is it possible to auto-scroll to project heading?

Is it possible to auto-scroll to project heading? 5 years 10 months ago #1211

  • Stephen
  • Stephen's Avatar
  • Offline
  • New Member
  • Posts: 19
  • Karma: -5
I have a catalog on my landing page which is below the fold: www.dv8.co.nz
So it is necessary to scroll down in the target page through the header and intro to see the project.

Is it possible to jump directly to the project title? Somehow?
The administrator has disabled public write access.

Is it possible to auto-scroll to project heading? 5 years 10 months ago #1212

  • eLEOPARD
  • eLEOPARD's Avatar
  • Offline
  • Administrator
  • Posts: 409
  • Thank you received: 54
  • Karma: -28
Dear Stephen,

When do you think is scrolling to the catalog should happen?
I mean should the user click on a button or some similar?
The administrator has disabled public write access.

Is it possible to auto-scroll to project heading? 5 years 10 months ago #1213

  • Stephen
  • Stephen's Avatar
  • Offline
  • New Member
  • Posts: 19
  • Karma: -5
Thanks,

Just as soon as the page opens with the project. See on the landing page site example, when you scroll down and click on a project the page opens on the project but it is down below the fold so the user needs to scroll down to realize the content has changed.. So what it needs to do is open already scrolled down to where the project title is.
The administrator has disabled public write access.

Is it possible to auto-scroll to project heading? 5 years 10 months ago #1214

  • eLEOPARD
  • eLEOPARD's Avatar
  • Offline
  • Administrator
  • Posts: 409
  • Thank you received: 54
  • Karma: -28
Dear Stephen,

I see that you are using DIVI theme.

Please try the following:

1. Navigate to Divi Theme Options > Integration tab. Make sure the “Enable header code” option is checked


2. Paste this code below and Save.
<script>
	$(function(){
		$('html, body').animate({
			scrollTop: $('.bop-project-area').offset().top
		}, 2000);
		return false;
	});
</script>

Now, everytime a single project loads, the view should always scroll down to the project title.
Let me know if it works for you:
The administrator has disabled public write access.

Is it possible to auto-scroll to project heading? 5 years 10 months ago #1215

  • Stephen
  • Stephen's Avatar
  • Offline
  • New Member
  • Posts: 19
  • Karma: -5
Thanks, done. Didn't work though, even though I can see it in source.
Last Edit: 5 years 10 months ago by Stephen.
The administrator has disabled public write access.

Is it possible to auto-scroll to project heading? 5 years 10 months ago #1216

  • eLEOPARD
  • eLEOPARD's Avatar
  • Offline
  • Administrator
  • Posts: 409
  • Thank you received: 54
  • Karma: -28
Deat Stephen,

Doing some hit and trial here :)

Please remove the previously added script and paste the following:
<script>
   jQuery(function () {
       if( jQuery('.bop-project-area').length ) {

           jQuery('html, body').animate({
               scrollTop: jQuery('.bop-project-area').offset().top
           }, 2000);

       }
       return false;
   }); 
</script>

Let me know if this works.
Last Edit: 5 years 10 months ago by eLEOPARD.
The administrator has disabled public write access.
Time to create page: 0.237 seconds

Need Customization? Feel free to...

Contact Us

If you like these extensions, help us buy Yoga Mats :)