![]() |
VOOZH | about |
jQuery Mobile is a jQuery based JavaScript library used to develop responsive content which is accessible on a variety of devices like mobiles, tabs, and desktops.
In this article, we will use the jQuery Mobile Popup reposition() method to relocate an already opened popup. The reposition() method accepts an object as a parameter.
Syntax:
$( ".selector" ).popup( "reposition", options );
The keys of the options object are described below:
CDN Links:
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="https://code.jquery.com/jquery-2.1.3.js"></script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.js"></script>
Example: In the example below we used Popup open() method to open the Popup Widget then we used reposition() method with positionTo option specified to relocate the popup after 3 seconds.
Output:
👁 jQuery Mobile Popup reposition() MethodReference: https://api.jquerymobile.com/popup/#method-reposition