$.append i Internet Explorer 7

Gör inte såhär:

var span = $("<span class=\"error\">").text("No u");
$("#errorcontainerthing").append(span);

Det fungerar inte i Internet Explorer 7 (och antagligen inga versioner under). Gör såhär istället:

var span = $("<span>").addClass("error").text("No u");
$("#errorcontainerthing").append(span);

Det borde fungera fint. Nu har jag sparat en timme i ditt liv.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>