I have a fancy set up at the top of document.ready that looks like this:
$('.fancyBox').fancybox({
'type': 'iframe',
'closeBtn': false,
'overlayShow' : true
});
Afterwards I'm checking a value on the page and simulating a click fi its true
if ($('#fromLogin').val() == "True") {
$('a#fancyLink').trigger('click');
}
Everything works fine but except the overlay doesn't show up. When I click the link manually it works fine though. What could I be missing?
EDIT: The relevant HTML posted below for the parent.
<input type="hidden" id="fromLogin" value= "@ViewBag.FromLogin" />
<a href="../Account/AccountOverview" id="fancyLink" class="fancyBox" style="display: block;">Click</a>
<div id="account_settings">
@Html.ActionLink("Update Account Settings", "Manage", "Account")
</div>
<div id="main_wide"> .... </div>