jquery click on anchor element forces scroll to top?

后端 未结 8 1602
故里飘歌
故里飘歌 2020-12-28 08:07

jQuery hyperlinks - href value? text][1]

I am running in to a problem using jquery and a click event attached to an anchor element. [1]: jQuery hyperlinks - href

8条回答
  •  南笙
    南笙 (楼主)
    2020-12-28 09:09

    just lose the

    href="#"
    

    In the a html tag... that's what causing the web page to "jump up".

     link text 
    

    and remember to add

    cursor: pointer;
    

    to your a's css so it will look like a link on mouseover.

    Good luck.

提交回复
热议问题