Skip to main content

Bug Tracker

Side navigation

#13166 closed bug (notabug)

Opened January 07, 2013 10:20AM UTC

Closed January 07, 2013 01:19PM UTC

text property is not working except firefox

Reported by: bharat20185@gmail.com 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')

)

Attachments (0)
Change History (1)

Changed January 07, 2013 01:19PM UTC by dmethvin comment:1

resolution: → notabug
status: newclosed

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