How to remove “Empty String passed to getElementById()” warning with jQuery Mobile?

In my case it was caused because I forgot to specify a value for the ‘for’ attribute of a label:

Missing id

<label for="">Stuff:</label>

fixed

<label for="someID">Stuff:</label>

EDIT: Removing the for attribute also prevents that warning

<label>Stuff:</label>

Leave a Comment

tech