ToddThomson/jQuery-Mobile-Subpage-Widget — Issue #3: Script snippets embedded in subpages get executed twice
Author: jekkel
Created: 2011-12-09 16:30:34+00:00
State: open

Reproduce with:

```html

Subpage content

Page content

```

I was able to fix this by introducing the following line in your plugin right before the subpage gets created as page via .page():

```javascript
// filter out script tags as those are already executed
newPage.contents().filter('script').remove();

```