Inside my jquery mobile website I'm sending from footer textinput request to the controller which sends back json data back to the view as popup window (data inside this popup window is rendered using jstemplate).

Everything works as expected but when I change page request is passed to the controller but popup window not showing. 

from my js function I'm sending 

```
 $("#myDataPopUp").popup("open").enhanceWithin();

```

and inside \_Layout.cshtml

```
<div id="myDataPopUp" data-role="popup" class="ui-content" data-theme="a" />

```

Again, everything works fine until I change page (since code is inside \_Layout) it should work on other pages as well.