I have the following in place:

Code:
 var diff = maxval - ui.value;
        $( "#output").html( diff?"diff. of " + diff : "no diff" );

Now I'd like to add an image to each, if there's a difference in value or not, ie:

Code:
var diff = maxval - ui.value;
        $( "#output").html( diff?"<img src='yes.png' height='50' width='50' /> diff. of " + diff : "<img src='no.png' height='50' width='50' /> no diff" );
Seeing as though that doesn't work, how can I set an image for each (including the text) in that output div?

A working jsfiddle demo would be amazing - I can't seem to get this working

I've also tried this but still no luck.

Code:
var diff = maxval - ui.value;
var img = new Image();
img.src = (diff > 0 ) ? "yes.png" : "no.png"; // assuming you mean to check positive value
img.width = "50px";
img.height = "50px";
var el = document.getElementById("output");
el.appendChild(img);
var text = (diff > 0) ? "diff" : "no diff";
var txt = document.createTextNode(text);
el.appendChild(txt);