JSFiddle - React, Tailwind, and code Playground
by Mark Beharrell
HTML
<!doctype html>
<body>
<div id="console-log"></div>
</body>
CSS
body {
margin: 0;
padding: 0;
background: #fff url(http://www.ellisonssolicitors.com/images/site/background_entry.jpg) top center no-repeat;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #39363a;
}
.console-line
{
font-family: monospace;
margin: 2px;
}
JavaScript
var consoleLine = "<p class=\"console-line\"></p>";
console = {
log: function (text) {
$("#console-log").append($(consoleLine).html(text));
}
};
$(document).ready(function() {
var bg = jQuery("body").css("background");
var bggold = bg.replace(".jpg", "_gold.jpg");
jQuery("body").css("background", bggold);
//var bg = jQuery("body").css("background-image");
//var bggold = bg.replace(".jpg", "_gold.jpg");
//jQuery("body").css("background-image", "url(" + bggold + ")");
//jQuery("body").css("background-image", bggold);
console.log(bggold);
});