I try to eleminate an 404 error occuring because the source (src) is missing..
var $chart = $("<img />")
    .addClass("trend-pic")
    .error(function(){
        console.log("error loading..")
    });
try{
    $chart.attr("src", jobs[counter].url + "test/trend")
}catch(err){
    $chart.attr("src", "");
}    
if tried many stuff to catch the error i.e. putting an .error(function(){}) at the end.
use the $chart.load() - method to check if the images gets loaded?
Non of those helped? 
GET {myURLString} 404 (Not Found) 
Browser: Safari