Workflow:
Passing JSON to angular scope and using ng-repeat
in the View to display it.
Using following function to show dialog on click of elements of a particular class.
$(function () {
$("#dialog").dialog({
autoOpen: false,
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "explode",
duration: 1000
}
});
$(".opener").on("click", function () {
$("#dialog").dialog("open");
});
});
$(function () {
$("#imagePopup").dialog({
autoOpen: false,
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "explode",
duration: 1000
}
});
Want it to get triggered on click of a particular class.
<tr ng-repeat="item in ItemList| filter:itemName ">
@*<td>
{{ item.CreatorID}}
</td>*@
<td >
{{item.ItemName}}
</td>
<td >
{{item.CreatorName}}
</td>
<td >
{{item.Length}}
</td>
<td >
{{item.Width}}
</td>
<td >
{{item.Price}}
</td>
<td >
{{item.ItemDescription}}
</td>
<td >
{{item.Quantity}}
</td>
<td >
<div class="opener" style="text-align:center">
<img ng-src="@Url.Content("{{item.ImagePath}}")" width="60" height="60" class="img-responsive img-circle" />
</div>
</td>
<td >
<span class="glyphicon glyphicon-pencil"></span>
</td>
<td >
<span class="glyphicon glyphicon-trash"></span>
</td>
</tr>
</table>
<button class="opener">Opener</button>
<button class="opener">Opener11</button>
<div id="dialog" title="Item Image">
<p>Sample text</p>
</div>
Here when I am clicking on Button Opener
& Opener11
popup appears but not on the click of <div>
which has the same class(inside ng-repeat).
Can anyone tell me if i'm missing anything?