jQuery filter by an attribute value

后端 未结 3 1183
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-12 11:27
Driver License State Email <
3条回答
  •  滥情空心
    2021-02-12 12:17

    There's no need for the : or double = in your attribute-equals selector, it should just be:

    $('.selectedColumns a[attributeid=' + $(this).val() + ']');
    

    Also if you're using invalid attributes, consider using data- attributes which are valid in HTML5, for example data-id instead of attributeid.

提交回复
热议问题