1
I’d like to depending on my condition ActionLink
was visible or not.
Razor:
<td>
@Html.ActionLink("Cadastrar site","MontarFancyCadastrarSite", "ItemOS",
new {ChaveOS = Model.ChaveOS }, new { @class = "siteFancybox fancybox.iframe" })
</td>
Jquery:
$("#ChaveSite").change(function () {
$.getJSON('@Url.Action("CarregarContatoSite","OS")',{chaveSite: $('#ChaveSite').val()},
function (contatos) {
if (contatos.length > 0)
{
$(this).parent().find("a.siteFancybox fancybox.iframe").show();
} else {
$(this).parent().find("a.siteFancybox fancybox.iframe").hide();
}
})
});
That way above is not working, someone could show me the error or other way to do it?
#Chavesite is a DDL.
– AbnoanMuniz