在ClojureScript中使用dommy,如何通过属性选择节点?例如,在jQuery中,这看起来像$('tr[data-id=1]')
。我试图(sel1 "tr[data-id=1]")
但我得到这个错误:通过属性选择HTML节点dommy
Uncaught SyntaxError: Failed to execute query: 'tr[data-id=1]' is not a valid selector.
这可能与dommy?如果不是,ClojureScript中最好的选择是什么? jayq?
样本HTML:
<table>
<tr data-id="1">
<td>Cow</td>
<td>Moo</td>
</tr>
</table>
你可以在这里发布你的html部分吗? –
@KrishR添加了示例HTML。 –
如果你已经为你的问题得到了答案,那么标记正确的答案总是善意的,即使它是你的;) – yonki