-1
我需要在屬性marker-end
中繪製所繪製的SVG中的所有path
元素。查找具有屬性的所有元素
我嘗試:
$('path').attr("marker-end") // Returns undefined
$('path').prop("marker-end") // Returns undefined
更新
另外path
元件not
具有給定的屬性。
更新2
確定,得到了$('path:not([marker-end])')
[jQuery文檔](HTTP: //api.jquery.com)... docs [選擇器](http://api.jquery。 com/category/selectors /)... docs [for attribute selectors](http://api.jquery.com/category/selectors/attribute-selectors/)... docs [for filters](http:// api .jquery.com/category/selectors/basic-filter-selectors /)(比如':not()') – 2014-10-01 14:03:57