VOOZH about

URL: https://www.geeksforgeeks.org/jquery/jquery-mobile-popup-reposition-method/

⇱ jQuery Mobile Popup reposition() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

jQuery Mobile Popup reposition() Method

Last Updated : 23 Jul, 2025

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:

  • x: The x-coordinate where you want to relocate the popup.
  • y: The y-coordinate where you want to relocate the popup.
  • positionTo: A jQuery Selector can be used to define the position where the popup is to be relocated.

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() Method

Reference: https://api.jquerymobile.com/popup/#method-reposition

Comment

Explore