sureshunivers
sureshunivers

Reputation: 1753

jQuery new element creation not working on IE8 Browser

I am creating an element DIV with html content like bellow,

var newDiv = $("<div />",{
   "class": "container",
   "width":234,
   "height":300,
   "html":"Testing <b>dynamic</b> content"
});
$("body").append(newDiv);

Above code is working fine for the browser chrome, safari, mozilla but not working in IE8. I am getting error as:

"Object doesn't support this property or method"

I used jQuery version 1.6

Any alternate script or ie8 fix is available?

Upvotes: 1

Views: 440

Answers (1)

Amir
Amir

Reputation: 4111

var newDiv = $("<div />",{
   class: "container",
   width:234,
   height:300,
   html:"Testing <b>dynamic</b> content"
});
$("body").append(newDiv);

Upvotes: 2

Related Questions