[jQuery] IE error with $(this).html()
i have some code that ie 7 having a real distaste for. which is
surprising since ie is usually spot on....
anyways here's the code in question:
if (mode == 5) {
$("#"+id+" .item_desc").show();
var items = $("#"+id+" .item").siblings();
jQuery.each(items, function () {
var desc = $(this).children(".item_desc").text();
var link = $
(this).children(".item_desc").children("a").attr("href");
var title = $(this).children(".item_desc").children("a").text();
var images = $(this).children(".item_media").html();
$(this).empty();
$(this).html('<img src="img/drop.png" class="drop"><span><a
href="'+link+'">'+title+'</a></span><div
class="desc_drop">'+images+'<p style="clear:left">'+desc+'</
div>');
$(this).children(".drop").click(function () {
$(this).siblings(".desc_drop").slideToggle("fast");
});
});
$("#"+id+" .item").css("height","auto");
$("#"+id+" .item").css("margin-left","10px");
$("#"+id+" .item").css("margin-top","10px");
$("#"+id+" img[class!='drop']").css("width", "23%");
$("#"+id+" img[class!='drop']").css("margin-right", "5px;");
$("#"+id+" img[class!='drop']").css("float", "left");
}
};
the "$(this).html(......) line is the one in question. I've
used .html() several times in the code with no errors. Can i not use
"this" with .html()?
Any help would be greatly appreciated!