Hi,
This could be due to quotation marks in generated HTML (just a guess since I haven't seen your code). The simulator is more forgiving in these cases than the device.
Code:
document.getElementById("btn").innerHTML = "<div onclick=\'mwl.toggle(\"#tg1\");return false;\'>wrong</div>";
document.getElementById("btn2").innerHTML = "<div onclick=\"mwl.toggle(\'#tg1\');return false;\">right</div>";
In those cases where CSS attributes are not working, are the rest of the attributes applied correctly? I.e. if you have set width and bg-color, only bg-color is missing but width works for selected element?
Br,
Ilkka