$("#topshops").empty(); // var displaynames=["No. OF TIMES ORDERED/TOTAL NO. OF TIMES ORDERED","DESCRIPTION","PLACE","SHOPMAILID"] var output=JSON.parse(decodeURIComponent(data.output)); for (var i=0;i<output.length;i++){> var ShopListDiv = $(' <div class=" col-lg-12 col-md-12 HotelList" id="HotelList"> </div>'); var ShopHeaderDiv = $('<div class="col-lg-12 col-md-12 HotelHeader">' + output[i].myfavourite + '</div>'); var ShopImage = $('<img class="img-responsive col-lg-3 HotelImage" style="max-width: 200px;max-height: 200px;" src=' + output[i].image + '>'); var ShopText = $('<div class="col-lg-9 col-md-9 HotelText"></div>'); // var shoplistimage=["images/Heart-icon.png","images/Actions-mail-mark-task-icon.png","images/City-Church-icon.png","images/Mail-icon.png"]; // var ArrayText = [output[i].count1,output[i].total_purchase,output[i].description,output[i].city,output[i].shopmailid]; var ShopInnerText = $('<div></div>'); /* var shopname = $("<label></label>") .prop("id", output[i].branch_id) .text(output[i].myfavourite) .css({ }); */ var purchas_probability =$("<label></label>") .prop("id",i) .text(output[i].count1+"/"+output[i].total_purchase) .css({ marginLeft: '5px' }); /* var shopimage = $("<img />") .prop("id", i) .prop("src", output[i].image) .css({ width : '100px', float: 'left' }); */ var shopicon=$("<img />") .prop("id", i) .prop("src","images/Heart-icon.png") .css({ width : '18px', height: '18px' }); var descriptionicon=$("<img />") .prop("id", i) .prop("src","images/Actions-mail-mark-task-icon.png") .css({ width : '18px', height: '18px' }); var shopdesc=$("<label></label>") .prop("id",i) .text(output[i].description) .css({ marginLeft: '5px' }); var cityicon=$("<img />") .prop("id", i) .prop("src","images/City-Church-icon.png") .css({ width : '18px', height: '18px' }); var city=$("<label></label>") .prop("id",i) .text(output[i].city) .css({ marginLeft: '5px' }); var mailidicon=$("<img />") .prop("id", i) .prop("src","images/Mail-icon.png") .css({ width : '18px', height: '18px' }); var shopmailid=$("<label></label>") .prop("id",i) .text(output[i].shopmailid) .css({ marginLeft: '5px' }); /* var shoplink=$("<button></button>") .prop("id",i) .text("view more") .val("view more") .css({ "width": "45px", "height": "45px" }); */ var ViewMenuButton= $('<button class="SearchButton openedshop" data-id="' + output[i].branch_id + '">'+aLangKeys[lang]['viewmenu']+'</button>'); ViewMenuDiv.append(ViewMenuButton); ShopListDiv.append(ViewMenuDiv); ShopInnerText.append(ShopListDiv); ShopListDiv.append(shopimage).append(shopicon).append(purchas_probability).append("<br>").append(descriptionicon).append(shopdesc).append("<br>").append(cityicon).append(city).append("<br>").append(mailidicon).append(shopmailid).append("<br> <hr>"); ShopListDiv.append(ShopHeaderDiv); ShopListDiv.append(ShopImage); ShopListDiv.append(ShopText); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)