Why does the hover event trigger as soon as the page is loaded?
function showSelector(position) {
alert(position);
}
function hideSelector() {
}
$("#1").hover(showSelector(17), hideSelector);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a href="" id="1">sup</a>
See Question&Answers more detail:os