Skip Navigation

[Resolved] Javascript not working correctly after upgrade

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 8 replies, has 2 voices.

Last updated by samB-3 9 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#254999

Any idea why the following javascript would not work properly after upgrading from WordPress 3.9.1/Views 1.5.1 to WordPress 4.0/Views 1.6.4?

jQuery(document).on('click','.wpv-filter-previous-link,.wpv-filter-next-link', function() {
$('html, body').animate({
    scrollTop: ($('.filter-submit').offset().top)
},500);
});

And by "not working properly" I mean that when clicking on the "wpv-filter-previous-link" or "wpv-filter-next-link" the page scrolls to a random point on the page and it is not nice and smooth, just quick and sudden. Where as before it would perform a nice smooth scroll to the specified button with the "filter-submit" class.

Any help would be appreciated.

#255271

Since it is a custom java-script problem, could you post a live problem URL for it? I need test it in my Chrome browser. thanks

#257672

Unfortunately it's on a member only/password restricted site so I'm not able to provide an example. Any other ideas?

#259188

Could you duplicate same problem with discover-wp.com. I need a live website to debug this problem
How and why to create a test site in Discover-WP
https://toolset.com/faq/how-and-why-to-create-a-test-site-in-discover-wp/

#259389

Ah, yes, I'd forgotten about that site. I will try to duplicate this and let you know when it's done.

#259459

Hey, Luoy, any way I can send you a private message?

#259507

Please fill below private detail box with login details of your test site,
also point out the problem page URL, thanks

#260195

I have edited the problem view:
hidden link

1) in section "Layout HTML/CSS/JS", modify the JS codes as below:

function Pagination_Callback(){
  jQuery(document).ready(function($){
    $('.wpv-filter-previous-link,.wpv-filter-next-link').on('click',function(event){
		$('html, body').animate({
    scrollTop: ($('.scroll-to-here').offset().top)
},700);
    });
  });
}
Pagination_Callback();

It will create a JS function "Pagination_Callback"

2) in section "Pagination and Sliders settings", click "Advanced options" button, fill the option "Callback function" with above function name "Pagination_Callback"

Please check if it is what you needed.

#264642

Sorry for the delay in getting back to you, I was away for a bit. Thank you very much for your help, it was right on, as usual and everything works great now. Thank you!

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.