Javascript for WP [login to view URL] Pro navigation bar footer

Concluído Postado há 5 anos Pago na entrega
Concluído 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.

CSS JavaScript jQuery / Prototype PHP WordPress

ID do Projeto: #16644020

Sobre o projeto

6 propostas Projeto remoto Ativo em há 5 anos

Concedido a:

tkshamseer

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

£20 GBP em 1 dia
(104 Comentários)
5.3

6 freelancers estão ofertando em média £23 nesse trabalho

niravvirani17

here to work with you and will fix like you need ,....................................................

£23 GBP em 1 dia
(860 Comentários)
8.3
VRwebdevelopers

here to make navigation bar footer able to do right now ////////////////////////////////////////////////////////////////

£23 GBP em 1 dia
(41 Comentários)
5.4
mayankinnovative

A proposal has not yet been provided

£23 GBP em 1 dia
(99 Comentários)
4.5
Kaki08

A proposal has not yet been provided

£33 GBP em 1 dia
(23 Comentários)
4.1