the problem is, the dynamic elements are created after dom is ready and that is why your galleryView not finding the li tag along with url for images. use separate jquery plugin that only read and validate URL for images in Ajax function, also ensure this Ajax call must be async:false so that it enforce to finish before anything further call in program. now in your document.ready call this plugin before others functions and $('#myGallery').galleryView.
$.fn.initImages = function()
{
$.ajax({
type: "GET",
url: "XMLFile.xml",
dataType: xml,
async:false,
success: function (xml) {
//read images from url
// validate images//
// store valid urls in obj= a1//
$(this).find('photo').each(function (index) {
$("#selectedPropertyImg_Wrapper").find("#myGallery").append("<li><img src= " + a1[index].text() + " /></li>");
});
}
});
}
now in your html call this function before galleryView plugin function
$(document).ready(function(){
$(this).initImages();
//call gallery now//
$(function () {
$('#myGallery').galleryView({
panel_width: 750,
panel_height: 500,
frame_width: 100,
frame_height: 67
});
})
});