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.
You need to use each()
$$('#cartov .overlay-login-display').each(function(ele) {
ele.setStyle({display: 'none'})
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With