10
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

updated at

Organization

jQueryでCSSのbackground-imageを変更する

自分用メモです。

設定されたbackground-imageのurlを無効にする場合

$('#hoge').css('background-image', 'none');

background-imageのurlを変更する場合

$('#hoge').css('background-image', 'url(test.png)');

background-imageのところを別のプロパティにすれば何にでも使える!!

Register as a new user and use Qiita more conveniently

  1. You can follow users and tags
  2. you can stock useful information
  3. You can make editorial suggestions for articles
What you can do with signing up
10
Help us understand the problem. What are the problem?