-
AuthorPosts
-
May 30, 2014 at 3:01 am #272216
Hi Support team,
I am using a filtering plugin on the following page (http://52kards.com/library/) so that users can search for specific types of videos. One issue is that if a user filters a certain parameter, then clicks on a video, and then hits the “back” button in his browser he will return back to the library, but the video grid on the page won’t display correctly.
I spoke to the developer of the filtering plugin and he gave me the following solution:
“Yes, that’s a bug with Enfold. Open themes/enfold/js/avia.js and change line ~647 from:
if (fixedMainPadding > 0 && hash && apply_to_container == ‘body’)
to:
if (fixedMainPadding > 0 && hash && apply_to_container == ‘body’ && hash.charAt(1) != “!” ) ”This solution worked just fine in previous versions of Enfold, but I just updated to the latest release (2.8.1), and this fix no longer works. Do you have a possible solution to the problem?
Thanks
AsadMay 30, 2014 at 7:26 am #272263Hey AsadIC!
I can’t test the page (I don’t see any videos here: http://52kards.com/library/ ) and not sure why the ! character would break the hash value but you can try to replace:
if (fixedMainPadding > 0 && hash && apply_to_container == 'body') { var scroll_to_el = $(hash);
with
if (fixedMainPadding > 0 && hash && apply_to_container == 'body') { if(hash.indexOf("!") > -1) return; var scroll_to_el = $(hash);
If this code change doesn’t solve the issue please contact the plugin author.
Cheers!
PeterMay 30, 2014 at 2:16 pm #272379Your modification didn’t fix the issue. I contacted the plugin developer and here’s what he said (it is beyond my understanding but maybe it will make sense to you).
“If Enfold applied our original fix verbatim, the issue would be resolved. It doesn’t sound like they fully understand the issue.
FacetWP uses “#!” as a hash instead of just “#” because it allows Google to automatically handle ajax. See: http://take.ms/zqPRi
Enfold intercepts all URL hashes beginning with “#” for use with their built-in “scroll-to-top” functionality. This is breaking FacetWP’s ajax-permalink functionality.
Reference: https://support.google.com/webmasters/answer/174992?hl=en”
Asad
May 30, 2014 at 8:51 pm #272577Hey Asad!
Try commenting line 77-78 in js/avia.js:
if($.fn.avia_smoothscroll) $('a[href*=#]', container).avia_smoothscroll(container);
Regards,
JosueMay 30, 2014 at 11:01 pm #272641Commenting those lines seems to fix the issue in Firefox, but not in Chrome.
Thanks
AsadMay 30, 2014 at 11:05 pm #272644The filter is working for me in Chrome:
http://52kards.com/library/Try flushing your cache and checking again.
Regards,
JosueJune 3, 2014 at 5:46 pm #274011 -
AuthorPosts
- The topic ‘avia.js modification’ is closed to new replies.