1
Answer

How to design Image gallery popup slider?

Dawood Abbas

Dawood Abbas

9y
474
1
I am appending images to table from webmethode, json like below..
 
<script type="text/javascript">
$(document).ready(function () {
alert('Hello');
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "Default4.aspx/BindDatatable",
data: "{}",
dataType: "json",
success: function (data) {
var imgs;
var el = "<tr>";
for (var i = 0; i < data.d.length; i++) {
if (i % 6 == 0) {
el += "</tr><tr>"
}
el += "<td><div style='width: 101px; font-size: 10px; vertical-align:top;'><img src=" + data.d[i].ImagePath + " height='60px' width='100px' /></div></br>";
el += "<div style='width: 140px; font-size: 10px; vertical-align:top; align:center;'><label class='label'>" + data.d[i].ImageAssignedName + "</label></div></td>";
}
el += '</tr>';
$("#gvDetails").append( $(el) );
},
error: function (result) {
alert("Error");
}
});
});
</script>
 
so now I want to populate images and slide one by one by pressing next and previous..
I tried many links which have in this site and aspsnippest but those are not working for my above code. 

Answers (1)