Opened 10 years ago
Closed 10 years ago
#13166 closed bug (notabug)
text property is not working except firefox
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | git |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hello All,
I am wondering that "text" property is not working except FireFox.
Actually, I wanted to load anchor tag on page load and used below code. jquery version 1.7.2
jQuery('body').append(
jQuery('<a />').prop({
'id' : 'anchor', 'href' : 'http://www.jquery.com', 'text' : 'Anchor Loaded'
})
)
and run in different browser but get output only in FireFox. For other browser I need to put text in html() function.
Other Broswer::
jQuery('body').append(
jQuery('<a />').prop({
'id' : 'anchor', 'href' : 'http://www.jquery.com'
}).html('Anchor Loaded')
)
Note: See
TracTickets for help on using
tickets.
Please ask for help on a forum. That is not the way to set the text content of an element.