Hello ,
I'm trying to show or hide a div tag based on whether a user is signed in or not.There is a value set to a logged in users name contained in a rails script tag and it is this value which I wish to assign to a javascript variable and if it is empty show the div and if it conains something hide the div.All this I want to do on page load.Any tps on how to go about this. All i've been able to find regarding this was diplaying or hiding the div by calling a function when a user clicked a link or button.
Ay tips or help will be greatly appreciated.
Manuel
I'm trying to show or hide a div tag based on whether a user is signed in or not.There is a value set to a logged in users name contained in a rails script tag and it is this value which I wish to assign to a javascript variable and if it is empty show the div and if it conains something hide the div.All this I want to do on page load.Any tps on how to go about this. All i've been able to find regarding this was diplaying or hiding the div by calling a function when a user clicked a link or button.
Ay tips or help will be greatly appreciated.
Manuel
Comment