When I click on a bellow link fancybox will open by calling EnquireCourseIndex method. ImageGallery class is used to call below script.
<a class="imageGallery btn btn-defaultPink" data-fancybox-type="iframe"
href="@Url.Action("EnquireCourseIndex", "DiplayCourse")">Enquire Now</a>
This is the script
<script type="text/javascript">
$(document).ready(function () {
$('.imageGallery').fancybox({
fitToView: false,
width: '600px',
height: '400px',
autoSize: false,
closeClick: false,
openEffect: 'none',
closeEffect: 'none',
padding: 0,
closeBtn: false,
'afterClose': function () {
window.location.reload();
},
});
});
Without using a < a href > tag Can I use the button?? I tried it out. but it isn't working. Does anybody have a idea??
This is the way how tried.
@using (Html.BeginForm("EnquireCourseIndex", "DiplayCourse"))
{
<input type="submit" value="Enquire Now" class="btn btn-defaultPink ssarch"/>
}