Is there a way I can tell an element on the page not to show using element.hide(); only if a storage variable I have mapped to that element is equal to the name of the page I'm on?
Something like:
If storage = page name, hide element.
Thanks.
Is there a way I can tell an element on the page not to show using element.hide(); only if a storage variable I have mapped to that element is equal to the name of the page I'm on?
Something like:
If storage = page name, hide element.
Thanks.
Hey Matt,
I use this code myself, if the element has no 'data value' present, the element is hidden from sight. It should work for you, no idea how you'll use it though.
$("textarea.hide-textarea").each(function(){
Code: Select all
if(!$(this).val()){
$(this).hide();
}
});
This part: textarea.hide-textarea, to explain: The name of the component "textarea." & then the class name "hide-textarea", you will need to replace these two element's with your own values (eg: button.hide-button << or something similar).
I hope this helps,
Let me know if it helps.
Thank you,