I am using fullcalendar in my code and I want to adjust the scroll position after (and only after) an event is clicked. I can do that by having $(window).scrollTop($("#MyId").offset().top) in eventclick but my problem is that i need to submit a form on each click as well and that causes a page reload. so i lose my scroll position. i can't do the scroll positioning in eventAfterAllRender or loading either, since i only want it to happen after an eventclick. Is there anyway I can know that reload is happening after an eventclick? not for example, after choosing a new date on the calendar? I really tried everything which came to my mind but I didn't get anywhere. any idea would be appreciated :)
Update: Part of the code I was trying to explain: the eventClick option of my fullcalendar:
eventClick: function (calEvent, jsEvent, view) {
$(window).scrollTop($("#IdOfTheDivIWantToJumpToAfterAnEventIsClicked").offset().top);
// Now I need To submit my form everytime I click on an event which makes the page loses scroll position.
$("#MyForm").submit();
},
I hope it is clearer now..