When a link is clicked, I have a <div>
popup that appears. This popup contains scrollable content when there is overflow.
If the same link is clicked again, I want the <div>
to be positioned at the top of the scrollable area. While this function works perfectly on Chrome and Firefox, in IE, the popup remains scrolled to the bottom.
<div id="myModal" data-role="popup" data-position-to="window" data-history="false" data-theme="a" data-corners="true" class="ui-content" style="text-align:center">
<div class="modal-dialog">
<div class="modal-content">
<div id='myModalContent'></div>
<a href="#" id="closeButton" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b">OK</a>
</div>
</div>
</div>
$(".anchorDetail").click(function () {
$("#myModal").scrollTop(0);
}