if ( $("#side-2").prop("checked") ) { alert("Этаж 8-9. дом 1-4. правая часть"); $("#flat-image").css("background", "url(<?php bloginfo('template_url')?>/img/flats/floors/8-9-right-bigger.png) center no-repeat"); }; I pull the template on WordPress and I need a simple script, the alert is triggered and the style does not change, why?
Edit: I noticed that when I use <?php bloginfo('template_url')?> , Then the style does not apply at all, and when I write just the path, the style is applied, but since it is Wordpress, it does not work.
$("#flat-image").lengthIn the alert. Well, you should always start with viewing errors in the console - Grundy