I have this code :
<div class="riga" style="border-top:0;">
<div class="col3" id="txtValoreCatastale">0,00 euro</div>
</div>
<script type="text/javascript">
txtValoreCatastale = $('#txtValoreCatastale');
</script>
seems I get an error :
SCRIPT438: Object doesn't support this property or method
show, Row 33 Char 4
that will Broke (on my whole original code) some of my script!
But if I wrote :
var txtValoreCatastale = $('#txtValoreCatastale');
it works perfectly.
Why this behaviour? Another massive bug?
IE creates its own global variable for every element id you use. So the problem is, IE has already created its own variable called txtValoreCatastale. By adding var in front of it you are telling IE that in the scope of your function it is a local variable and so IE allows it. If you called it some other name like someOtherVariableName it would have worked without var in front.