jQuery Mobile Framework

Navigation Search

Question:

Triggering create on injected HTML does not work.

Answer:

It is important to remember that create must be triggered on the parent container and not on the individual element that needs to be enhanced.


//HTML
<form id="formid">
	<input type="search" id="searchInput"/>
	<button id="submitButton">Submit</button>
</form>
//javaScript **CORRECT**
$("#formid").trigger("create");
//javaScript INCORRECT
$("#serchInput").trigger("create");
$("#submitButton").trigger("create");
All Questions & Answers