jQuery Mobile Framework

Navigation Search


How can I stop JQM from enhancing a block of elements?


To prevent jQuery Mobile from enhancing an entire block of content add data-enhance="false" to the parent container and nothing within the container will be enhanced.

To use data-enhance="false" you must also set $.mobile.ignoreContentEnabled to true prior to initialization

$(document).bind("mobileinit", function(){
  $.mobile.ignoreContentEnabled = true;

An important note about setting ignoreContentEnabled to true is this has a substantial negative impact on performance. This is because now every time an element is to be enhanced jQuery Mobile must now traverse up the entire DOM tree to make sure the the element does not have a parent with data-enhance false set on it.

All Questions & Answers