Come posso verificare se esiste un ID di attributo in jQuery?Verifica se l'attributo ('id') esiste in jQuery
ho cercato in giro e ha scoperto che questo dovrebbe funzionare:
if ($(this).attr('id').attr('id'))
{
}
ho ancora ottenere questo errore: TypeError: Oggetto gauge1 non ha un metodo 'attr'
Quale versione jQuery stai usando? – madth3
Solo ... testalo. Se è una stringa vuota, allora vai. – Blazemonger
Sto usando la versione 1.7.2 – CodeMan5000