Inside my jquery Append() I wan't to run an IF-statement to include an image on all my objects except on the first one.
Like:
var i = 0;
$('#divDetailsForSelectedInfo').append(
'<div class="roundedAndBoxShade leftResultObject" id = "' + value.Query.Id + '">'+
'<div class="leftResultObject_inner">' +
if (i > 0){
<img src="/img.jpg"/>;
}
'<div>asdf</div>');
The code is generated by Json+Jquery and then it is all appended on a div in my index-file. As far as I've been able to tell through immence google-ing this can't be done, but I might be wrong?
If it is indeed "impossible", could the :first selector in Jquery be used in some cool way?