Clicking anchor should execute javascript not go to new page

前端 未结 5 687
忘掉有多难
忘掉有多难 2021-01-14 07:45

I have a HTML anchor that when clicked should make a div slide up or down (I call JQuery\'s .slideToggle(); function);

My Problem: When

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-14 08:07

    You want this:

    Attach File
    

    The return false prevents the link from doing anything after the onclick stuff runs.

提交回复
热议问题