Toolbar Not Working Correclty

QuestionsCategory: PDF Light ViewerToolbar Not Working Correclty
Cornerstone asked 7 years ago
http://pobfundraising.staging.wpengine.com/durand-test-page/
The < > navigational arrows don’t seem to be working on my toolbar. The page turn does work but when you turn a few pages and then hit the nav arrows it goes back to page 1.
Thanks! 
support
replied 7 years ago

Hello Cornerstone, could you please try to turn off hash navigation ( http://nimb.ws/RsDBqM ) on plugin’s settings page ( /wp-admin/options-general.php?page=pdf-light-viewer ) and see if that will help?

Cornerstone
replied 7 years ago

Unfortunately, this did not resolve the toolbar issue. Is there anything else that might be going on? Thanks!

super
Staff replied 7 years ago

We are adding popup feature to the 0.1.7 PRO Addon version. Let's see if it will work for you. The plugin just submitted via Codecanyon. Once it will be approved, you should receive an email notification. Please let me know when you'll have a chance to install it. After that you could use new shortcode: [pdf-light-viewer-popup id="576"]Open popup[/pdf-light-viewer-popup]. Here is how it looks on our side http://pdf-light-viewer.wp.teamlead.pw/popup-pdf-demo/

Cornerstone
replied 7 years ago

I can’t wait to give it a try! I really appreciate the help with this feature and will be updating my previous review for PDF Light Viewer on the EnvatoMarket to reflect this.

Cornerstone
replied 7 years ago

I’ve updated the plug-in and have applied the shotcode for the new pop-up. I’ve also disabled my previous pop-up builder in case that would be conflicting. The pop-up is working but the toolbar is still having trouble. To verify that it wasn’t attributed to any customization I have also installed the PDF Light Viewer on a fresh install and it’s operating the same way. Is there something with the Divi theme that’s conflicting by chance?

http://landart.wpengine.com/

http://pobfundraising.staging.wpengine.com/durand-test-page/

1 Answers

Best Answer

super Staff answered 7 years ago
Thank you for examples. Yes, looks like we have some hashchange conflict with the Divi theme.
Divi theme is trying to handle any link tag, which href attribute is started from ‘#’ but not equal the ‘#’. Thus it conflicts with PDF Light Viewer controls.
To solve this issue I can see two workarounds right now:
First you can modify the file http://landart.wpengine.com/wp-content/themes/Divi/js/custom.min.js ( and/or http://landart.wpengine.com/wp-content/themes/Divi/js/custom.js ) and replace this code:

$('a[href*="#"]:not([href="#"])').click(function(){

by this code:

$('a[href*="#"]:not([href="#"]):not([class*="js-"])').click(function(){

Second, you can try move http://landart.wpengine.com/wp-content/themes/Divi/js/custom.min.js and http://landart.wpengine.com/wp-content/themes/Divi/core/admin/js/common.js down in the header to be under the http://landart.wpengine.com/wp-content/plugins/pdf-light-viewer/assets/js/magazine.js
Both ways could require modifying of the theme code. So in case of theme update these changes should be re-applied. Unfortunately I cannot see any more accurate solutions so far.

Cornerstone
replied 7 years ago

Modifying the custom.mini.js code did the trick! Thank you for helping me determine the issue within the DIVI theme.

super
Staff replied 7 years ago

I was glad to help you!