Opened 12 years ago
Closed 12 years ago
#9568 closed bug (fixed)
customize tag's attribute
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | attributes | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
i have a customize html like below: <codeA id="002" disabled="disabled" checked="checked" myattr="myattr2" />
use function "attr", i can get attribute myattr, but not disabled or checked
any suggestion ?
sample like: http://jsbin.com/agofe4
Change History (6)
comment:1 follow-up: 2 Changed 12 years ago by
comment:2 Changed 12 years ago by
Replying to anonymous:
use prop() functon...
take a look at my sample code at http://jsbin.com/agofe4
i used prop(), it does nothing.
i think it doesn't work for reserved word by customize tag
comment:3 Changed 12 years ago by
Component: | unfiled → attributes |
---|---|
Owner: | set to [email protected]… |
Priority: | undecided → low |
Status: | new → pending |
hmm, so you need disabled and checked on an invalid html tag where disabled and checked don't actually do anything on that tag? It will work if the page is made an xml page.
comment:4 Changed 12 years ago by
Let me revise my statement. It's supposed to work if set to xml, but hooks are currently set whether it is xml or not. I can fix that much.
comment:5 Changed 12 years ago by
set to xml ? does it meens the tag is closed ? i did it.
it works well for customize attribute , in my example is "myattr".
in my project, i inherit a layout xml from an exist project, and rerender it to html page, so i need it.
now i use getAttribute function to get the value.
comment:6 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | pending → closed |
Attribute hooks do not need to be attached in XML docs. Fixes #9568.
Changeset: 641ad802111d2dc16ccf4b3721784a6addaf20df
use prop() functon...