Hi, in my html page, I have the following:
<div id="rub">
Select at least one Rub
</div>
In the script code, I have
if ( some condition ... )
$('rub').replace("Rubs selected:");
Which works fine, but when a second event is triggered, in the code I have
if ( some other condition ... )
$('rub').replace("Selected at least one item:");
That gives the error
$("rub") is null
It's as if the rub reference was lost after the first replace. (Also tried with Element.replace with the same result)
Any clues ? Thanks in advance.