I have a btn that when clicked its open popover with three other btn. One of them should trigger Ajax. I'm using data-html="true" in order to set the btn inside the popover. I added a onclick to the delete btn in the popover, but when running the page its just wont appear in the tag, the same with href="javascript:function()".
Any Idea what I can do to call Js function from the btn inside the popover? Html:
<a href="#" class="secondary" role="button" id="mealbtn" data-toggle="popover" data-placement="top" data-content='<div class="btn-group btn-group-sm" style="padding:0px;"><a href="/Meal/Recipe?conid=@item.id&recipeid=@Model.recipesCon.Where(c => c.mealId == item.mealId).First().RecipeId" class="btn btn-info btn-sm"><span class="glyphicon glyphicon-info-sign"></span></a><a href="/Meal/DinnerMeal/@item.id" class="btn btn-warning btn-sm"><span class="glyphicon glyphicon-pencil"></span></a><a class="btn btn-danger" id="delete-meal-btn" href="#@item.id"><span class="glyphicon glyphicon-trash"></span></a></div>' data-html="true" title="@Model.recipesCon.Where(c => c.mealId == item.mealId).First().Recipe.name" ><span class="glyphicon glyphicon-apple"></span></a>
Js try:
$('#delete-meal-btn').click(function () {
alert('btn clicked'); });