Bug Tracker

Opened 6 years ago

Closed 6 years ago

#13166 closed bug (notabug)

text property is not working except firefox

Reported by: bharat20185@… 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')

)

Change History (1)

comment:1 Changed 6 years ago by dmethvin

Resolution: notabug
Status: newclosed

Please ask for help on a forum. That is not the way to set the text content of an element.

Note: See TracTickets for help on using tickets.