Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript magic line doesn’t stop when click on the link , coz the page refresh after clicking Re: magic line doesn’t stop when click on the link , coz the page refresh after clicking

#112761
neerukool
Participant

Hi @tareq,

since the pure effect of page jump wont be seen in codepen, test if the following code modification helps:
change code of this line —-> $(“#menu li a”).click(function(event){

after .data(“origWidth”, $magicLine.width()); put the following line:
—-> event.preventDefault();

try implementing in an actual environment and send test link if possible. we wont be able to check it properly in codepen.

Thanks.