0
I wonder if there’s any way to do it, because I have a function that when I click on a menu button it captures via jquery the id of the page but if example I am on the START page that has no id and go to page service that has ID it gives a Reload and my action does not work have some way pebble storage us coookies sap ?
$('.sub-menu a').click(function() {
var anchor;
var link = $(this).attr('href');
if (link.indexOf('#') !== -1) {
anchor = '#' + link.split('#').pop();
console.log('anchor',anchor);
}
$('.id-sub').slideUp(2000);
if (anchor !== undefined) {
$(anchor).slideDown(2000).addClass('fixed');
$('html,body').animate({ 'scrollTop': $(anchor) }, 600, function(){
window.location.hash = target;
})
}
});
because next I need to hide all the contents in the class ('.id-sub')
more when I left the page START and click on the page SERVICE he had to show me only the ID I clicked and hide the rest of the content more like the page of the Reload it hides everything and does not show the id I clicked
Specify what you want to do, i.e., what functionality you want to implode.
– Jorge Costa
so I have a menu that contains
INICIO
andSERVIÇOS (com sub-menus)
each sub-menus of these has a certainID
when I am on the START page and I want to go to the SERVICE page it has to see the id I clicked that the above function already shows the correct id and hide the others because if this content is on a single page– Filipe Nickel Sala
if I am already inside the page
SERVIÇO
and click onid
it works normally but when I’m on the pageINICIO
and click on asub-menu
it shows all the content of that page being that it was to show only the content ofid
clicked– Filipe Nickel Sala
gave to understand a little?
– Filipe Nickel Sala
I’m sorry but I can’t understand the purpose
– Jorge Costa
have a
MENU
this menu hasINICIO
andSERVIÇO (com sub-menus de cada serviço)
if I am on the menu page and click on the sub-menus it gives a sliderUP and slideDown effect as per theid
that is clicked from the sub-menu but if I am on the pageINICIO
and click on aid
of the sub-menu it would have to show only the content of theid
that I clicked right more it doesn’t happen it just from Reload on the page and shows all contents of allid
– Filipe Nickel Sala
what I want to do is to change the page it shows me only the content of
id
clicked– Filipe Nickel Sala