Suppose I have these divs:
<div class="hat" rel="cap"> <div class="hat" rel="pine"> <div class="hat" rel="mouse">
How to use jQuery for "where"?
for example
$("div.hat").remove WHERE rel="mouse"
Use Attribute Equals to Selector :
$('div.hat[rel=mouse]').remove()
You can use attribute selector:
$("div.hat[rel]") // to get all <div class="hat"> tags with a rel attribute $('div.hat[rel="mouse"]') // to get a <div class="hat"> tag with a specific rel attribute
, . :
$('div.hat[rel=mouse]').remove();
, , , , . API jQuery .
Source: https://habr.com/ru/post/1733502/More articles:Problem displaying TabHost layout in new intent - androidSQL Server - CHARINDEX always returns 0 - stringДоступ к внешней переменной из внутреннего анонимного Runnable - javaGeneric Model on Mac and iPhone - iphoneГде вы поддерживаете среду разработки веб-сайтов, на своей рабочей станции или на сервере? - phpJQuery gets the value of the element: onfocus = "inputInlineHint (self);" - javascriptСоответствие шаблону F # - .nethowto: make Tortoise Hg and Tortoise Svn coexist - version-controlHow to access values from dynaaction form in jsp - strutspython csv - data export and formatting color, text format, etc. - pythonAll Articles