Appending Elements to a Section In IE

Appending Elements to a Section In IE

In IE7 and IE8, trying to do this fails:

  1.             var $tagsection = $("<section class='links'></section>");
  2.            
  3.             $tagsection.html("<p>test</p>"); //or
  4.             $tagsection.append("<p>test</p>");

But changing the section to a div, works:

  1.             var $tagsection = $("<div class='links'></div>");
  2.            
  3.             $tagsection.html("<p>test</p>"); //or
  4.             $tagsection.append("<p>test</p>");

I receive the following error:

Line : 17
Char : 55207
"Unexpected call to method or property access"

I'm using jQuery 1.5 and Modernizer.


Any ideas?