jQuery .attr retrieving custom attribute returns undefined

前端 未结 5 1559
北荒
北荒 2021-01-18 00:55

i have the following problem using jquery.

I have sth like this

5条回答
  •  花落未央
    2021-01-18 01:35

    I can confirm this code snippet works perfectly in Chrome 11, Firefox 4 and IE 9 using the jQuery Git version.

    EDIT: For the ones advising prop(), check the docs. Prop() is used for boolean attributes like: checked, disabled etc.

提交回复
热议问题