-2
I have on a page of my website a menu dropdown
with a list of rock bands. When you click on the menu it "drops" down showing the list by clicking on some band from that list it closes that menu dropdown
and brings in a div
below the information of the selected band. Only when selected a band from the bottom of this menu it does not raise the page to the beginning of the band information, it is in the middle of the information.
I would like to know how to make him go to the top of that information. Ah, I have tried to make an anchorage on menu
and in info
, but it won’t go to the anchoring part. If anyone wants to take a look at the menu
in action the page is: http://fraturaexposta.esy.es/HTML/Paginas/dicas.php .
Could someone help me?
in case only need to add this code in the event function file?
– Fratura Exposta
I tried to add this code of all that is way but it stops working the function or does nothing different. is that this information of the band he pulls from a div inside a page that works in the mobile version of the site, in case he pulls the div that has the information of the band into the div of the site for Desktop.
– Fratura Exposta
Yeah, I got that.
– Phiter
that code I sent you put in place of
$('#div1').load(
– Phiter
Broder, I put it there but it didn’t work, he stopped calling the div who has the information of the band to the site and opening you direct page where ta this div.
– Fratura Exposta
i used the code like: $(Document). ready(Function(){ $("#band a"). click(Function( e ){ e. preventDefault(); var href = $( this ).attr('href'); $("#div1"). load( href +" #div1", Function(){ $(this). Animate({ scrollTop: 0 }, "fast"); }); }); $(Document). ready(Function(){ $("#a band"). click(Function(){ $("#panel"). Hide("slow"); }); ;});
– Fratura Exposta