Rectangle 27 0

<button>button</button>
button{
    position:absolute;
    top:10px;
    left:10px;
}
$(function(){
    $("button").on({
        mouseover:function(){
            $(this).css({
                left:(Math.random()*200)+"px",
                top:(Math.random()*200)+"px",
            });
        }
    });
});

Simply for the reason that ,that guy was getting a lot of bad press, So atleast I would help him out . I was just being nice

jquery - Tricky Button Moving Away when Mouseover in Javascript? - Sta...

javascript jquery html frontend
Rectangle 27 0

You should try to restrict your JavaScript usage to when it's necessary. You can achieve the same through regular CSS. Here's an example:

.button:hover .initialText, .hoverText {
    display: none;
}
.button:hover .hoverText {
    display: block;
}
<div class="button">
    <span class="initialText">Followed</span>
    <span class="hoverText">Unfollow</span>
</div>

javascript - Change button text on mouseover by jQuery - Stack Overflo...

javascript jquery