LoginSignup
1

More than 5 years have passed since last update.

マウスオーバーした画像をぐるぐる回す jQuery

Posted at
$('img').mouseover(function(e) {
  console.log(
    window.setInterval(function() {
      $(e.target).css(
        {transform: "rotate(" + parseInt((new Date()).getTime()/10)%360 + "deg)"}
      )
    })
  )
});

解除するには、console に出た ID を見て clearInterval してください

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1