Within my prototype class, I have a function called loginSuccess. With in this function I have this bit of code
$$('#cartov .overlay-login-display').setStyle({display: 'none'});
What I expected this to do was to hide the div. However, I get this exception: Exception : TypeError: $$("#cartov .overlay-login-display").setStyle is not a function
From everything that I have researched, this is the correct syntax. So I am not sure what I am doing wrong. Any help with this is greatly appreciated.
Within my prototype class, I have a function called loginSuccess. With in this function I have this bit of code
$$('#cartov .overlay-login-display').setStyle({display: 'none'});
What I expected this to do was to hide the div. However, I get this exception: Exception : TypeError: $$("#cartov .overlay-login-display").setStyle is not a function
From everything that I have researched, this is the correct syntax. So I am not sure what I am doing wrong. Any help with this is greatly appreciated.
Share Improve this question edited Jun 13, 2011 at 23:37 David Tang 93.7k32 gold badges168 silver badges149 bronze badges asked Jun 13, 2011 at 17:31 rottmanjrottmanj 5311 gold badge9 silver badges21 bronze badges1 Answer
Reset to default 9You need to use each()
$$('#cartov .overlay-login-display').each(function(ele) {
ele.setStyle({display: 'none'})
});