So überprüfen Sie, ob das Datenattribut in jQuery vorhanden ist

if ($("#dataTable").data('timer')) {
  ...
}
Sikadner