A03reserved<...">All geek questions in one placeJQuery - How to select elements that do not have a class?How to get elements that don't have class names? <td class="B A">A03<sub>reserved</sub></td> <td class="B R">R70</td> <td>105</td> <td class="M C">L220</td> I'm doing it now $('td').not('.A, .B, .C, .M, .R')There must be a better way!+3jquery jquery-selectors css-selectors traversalbrandonjp Apr 12 '10 at 18:46source share3 answersYou can use an attribute selector with an empty value:$('[class=]') +12Jimmy cuadra Apr 12 '10 at 18:52source sharehow about this:$("td:not([class])") not sure if this will work for something like:<td class=""> +7Ty w Apr 12 '10 at 18:51source shareOne way to do this is to use filter():$("td").filter( function() {return this.className=='';} ) 0Tomalak Apr 12 '10 at 18:52source shareSource: https://habr.com/ru/post/1740814/More articles:RIA services are not refundable. - c #Определить количество процессоров IDLE ruby - linuxC - проверить, является ли строка подстрокой другой строки - cJava-классы в игровом программировании? - javaJquery plugin with multiple functions - javascriptmarking IronPython class as serializable - .netJQuery.post dynamic data callback function - javascriptAre NSColors available such as tungsten and steel? - propertiesHow to pass a function to a switch in a button group created using the manual in MATLAB? - radio-buttonHow to make IIS wait until the WCF service is ready? - iisAll Articles
How to get elements that don't have class names?
<td class="B A">A03<sub>reserved</sub></td> <td class="B R">R70</td> <td>105</td> <td class="M C">L220</td>
I'm doing it now $('td').not('.A, .B, .C, .M, .R')
$('td').not('.A, .B, .C, .M, .R')
There must be a better way!
You can use an attribute selector with an empty value:
$('[class=]')
how about this:
$("td:not([class])")
not sure if this will work for something like:
<td class="">
One way to do this is to use filter():
filter()
$("td").filter( function() {return this.className=='';} )
Source: https://habr.com/ru/post/1740814/More articles:RIA services are not refundable. - c #Определить количество процессоров IDLE ruby - linuxC - проверить, является ли строка подстрокой другой строки - cJava-классы в игровом программировании? - javaJquery plugin with multiple functions - javascriptmarking IronPython class as serializable - .netJQuery.post dynamic data callback function - javascriptAre NSColors available such as tungsten and steel? - propertiesHow to pass a function to a switch in a button group created using the manual in MATLAB? - radio-buttonHow to make IIS wait until the WCF service is ready? - iisAll Articles