Using Jquery AJAX to get a value from a PHP script.
This line works fine:
$.post('get_img.php',function(data){$("#result").append(data)});
This line does not:
$.post('get_img.php',function(data){$("div:hidden:first").css('background-image','url(data)')});
How can I get the data returned from the ajax call to go directly to the url value?
Since
datais a variable, if you want to use its value then it should be concatenated to the string.