Remove #&ui-state=dialog from URL in Jquery Mobile When Popup Opens

Date Published: 07/04/2021 Published By: JaiSchool

Simple, you can add a data-history="false" attribute to your popup. By doing so, it will not appear in URL nor saved in history.

<!DOCTYPE html>
	<title>Remove #&ui-state=dialog from URL</title>
	<link rel = "stylesheet" href = "">
    <script src = ""></script>
    <script src = ""></script>

<a href="#testpopup" data-rel="popup" data-position-to="window" data-transition="pop" class="ui-btn">Popup</a>

<div data-role="popup" data-history="false" id="testpopup" data-overlay-theme="b" data-theme="b" data-dismissible="true">
	<a href="#aftercopypopup" data-relation="close" class="ui-icon-delete ui-btn-right ui-btn-icon-notext">Close</a>
	<div data-role="header" data-theme="a"><h3 id="popup-title" style="margin:0px 10%;">Popup Header</h3></div>
	<div role="main" class="ui-content">
		<p align="center">Remove #&ui-state=dialog from url</p>


Publish A Comment

Leave a Reply

Your email address will not be published. Required fields are marked *