Javascript for WP [login to view URL] Pro navigation bar footer
£10-20 GBP
Pago na entrega
Using Wordpress with the X Pro theme from [login to view URL] I'd like to make a footer nav bar's scroll bar persistent between page reloads / a new page. I got a half baked solution from the developers at [login to view URL] with this code:
jQuery(document).ready(function($){
var get_scroll_position = [login to view URL]("scroll_position");
if($('footer .x-bar-scroll').length > 0) {
$('footer .x-bar-scroll').scrollLeft([login to view URL]("scroll_position"));
}
$('footer .x-bar-scroll').on('scroll', function(){
var scroll_position = $(this).scrollLeft();
[login to view URL]("scroll_position", scroll_position);
});
});
I can see the scroll_position local storage value update while scrolling the nav bar and the value is retained when I click through to another page or reload a page. But the scroll bar position isn't retained, it just resets to the default far left position.
After some more googling I pieced together this code but the scroll bar position doesn't update:
jQuery(document).ready(function($){
var get_scroll_position = [login to view URL]("scroll_position");
if($('footer .x-bar-scroll').length > 0) {
$('footer .x-bar-scroll').scrollLeft([login to view URL]("scroll_position")).perfectScrollbar('update');
}
$('footer .x-bar-scroll').on('scroll', function(){
var scroll_position = $(this).scrollLeft();
[login to view URL]("scroll_position", scroll_position);
});
});
jQuery(document).on('beforeunload', function() {
$('footer .x-bar-scroll').scrollLeft([login to view URL]("scroll_position")).perfectScrollbar('update');
});
I'd like ideally a script that can be applied to a set of pages (either based on a URL folder structure or if the script can be applied to a header JS container) instead of the global JS container as instructed by the theme developers. The successful bidder will have admin access to the wordpress site.
ID do Projeto: #16644020
Sobre o projeto
Concedido a:
Hi, I can do this for [login to view URL] me the issue in detail please come to chat for more discussion. waiting for your positive response
6 freelancers estão ofertando em média £23 nesse trabalho
here to work with you and will fix like you need ,....................................................
here to make navigation bar footer able to do right now ////////////////////////////////////////////////////////////////