In the google chrome browser, everything works, and firefox finds nothing, in the console either empty or null.
$("html,body").on("click", ".k_s_main", function(){ // получение фона var section_bg = $(this).parents(".k_section").css("background"); //var myRe = /url\(\"(.+?)\"\)/ig; //var s_bg = myRe.exec(section_bg); console.log(section_bg); }) .k_section { width: 32px; height: 32px; background: url('https://www.gravatar.com/avatar/ed370216aefa86d4246055ccdc9394e5?s=32&d=identicon&r=PG'); } .k_s_main {width: 32px;height: 32px;} <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="k_section"> <div class="k_s_main"></div> </div> If it is more specific, then you need to get exactly the path to the background image, and not the entire url ("... etc., but in the end everything works fine in chrome