andru26
3/30/2017 - 9:26 PM

Check if attribute exists

Check if attribute exists

if ($('#A').attr('myattr') !== undefined) {
  // attribute exists
} else {
  // attribute does not exist
}