문제

I have a bunch of divs set up with a class that triggers a jquery click function.

The divs each have just this in them so that the hand cursor appears on mouseover

<a href="#">▼</a>

Problem is, the page scrolls to the top on click (which makes sense).

What's the way to not have the page jump to the top, while making the hand cursor appear on mouseover?

Thanks guys.

도움이 되었습니까?

해결책 2

Rather than use an anchor tag just set style="cursor:pointer;"

다른 팁

You can use javascript:void() instead of # as shown below

<a href="javascript:void()">▼</a>

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top