I am using the following piece of code
function showContacts(records) {
$j('#cList').empty();
$j.each(Contacts.data(),
function() {
var newLi = $j('<li></li>');
var newLink = $j('<a id="' +this.Id+ '" data-transition="flip">'+'<img class="myListimage" src='+this.pic__c+'></img>' +this.FirstName+ ' '+this.LastName+ '</a>');
newLink.click(function(e) {
e.preventDefault();
$j.mobile.showPageLoadingMsg();
$j('#fName').val(Contacts.findRecordById([this.id]).FirstName);
$j('#lName').val(Contacts.findRecordById([this.id]).LastName);
$j('#phone').val(Contacts.findRecordById([this.id]).Phone);
$j('#email').val(Contacts.findRecordById([this.id]).Email);
$j('#pic').val(Contacts.findRecordById([this.id]).pic__c);
$j('#contactId').val(Contacts.findRecordById([this.id]).Id);
$j('picture1').val(Contacts.findRecordById([this.id]).Picture__c);
$j('#error').html('');
$j.mobile.changePage('#detailpage', {changeHash: true});
});
newLi.append(newLink);
newLi.appendTo('#cList');
// x++;
});
$j.mobile.hidePageLoadingMsg();
$j('#cList').listview('refresh');
}
I am displaying it in
<div data-role="content" >
<li><a href="#"><img src="pic"/></a></li>
<div data-role="fieldcontain">
<label for="fName"><b>First Name:</b></label>
<output name="fName" id="fName" />
</div>
<div data-role="fieldcontain">
<label for="lName"><b>Last Name:</b></label>
<output name="lName" id="lName" />
</div>
<div data-role="fieldcontain">
<label for="phone"><b>Phone:</b></label>
<output name="phone" id="phone" />
</div>....
The image is not being displayed. Please let me know if anyone can figure it out Thanks