jquery/jquery-mobile — Issue #3135: plugins cannot be run on pages pulled into the DOM
Author: frequent
Created: 2011-11-22 13:53:42+00:00
State: open

I have three pages
- page1.html
- page2.html
- page3.html

All pages get all scripts, so whichever page is loaded first, also has the plugin on board.

The plugin should only fire on page2 which has a trigger of _data-somesome="true"_ and gives paragraphs a red border.

**Problem**:
If I load page2 directly, the plugin detects the trigger and fires. If I start from either page1 or page3 and then go to page2, the trigger is detected correctly, but the plugin does not fire.

**Reproduce**
1. Go this page: http://www.franckreich.de/jqm/page2.html
2. If you go there directly, it works = red borders
3. Start from page1 - http://www.franckreich.de/jqm/page1.html
4. Go to page2
5. No red border, console tells you the trigger is detected, but the plugin does not fire
6. Start from page3 - http://www.franckreich.de/jqm/page3.html
7. Go to page2
8. Same as above, trigger detected, plugin does not fire.