I would like depending on whether my 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 it's not working, could someone show me the error or another way to do it?