Why does not change the background?
$(document).ready(function() { (function bg_change() { $('.button_change') .animate({ opacity: 0 }, 'slow', function() { $(this) .css({ 'background-image': 'url(/img/button/btn_hover.jpg)' }) .animate({ opacity: 1 }); }).toggle(1000).animate({ opacity: 0 }, 'slow', function() $(this) .css({ 'background-image': 'url(/img/button/btn.jpg)' }) .animate({ opacity: 1 }); })(); bg_change(); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <div class="button_change"></div>