I am using javascript (winJS) for making my windows store app (UWP app). I want to load all svg images from my app directory and show them inside a div. I was able to do this using ajax request. But looks like ajax doesnt works in winJS UWP app. I used jquery and ajax request like this:
var fileextension = ".svg";
var classx = "image";
var tr = "true";
var businessDir = "image/business";
$.ajax({
url: businessDir,
success: function (data) {
$(data).find("a:contains(" + fileextension + ")").each(function () {
var filename = this.href.replace(window.location.host, "").replace("http:///", "");
$(".myDiv").append($("<img src=" + filename + " class=" + classx + " draggable=" + tr + "></img>"));
});
}
});
How can load images from my 'image/buisness' directory in winJS UWP app.I also tried this code in cordova windows store app, but that also didnt work.