Phonegap API requires element's id, not element itself