Rails - how to require user to be logged in for a jquery powered button
In my application, I have a page with tabs that update the contents of a content area. I have it structured so that the content area holds data for multiple attributes of objects and the jquery tabs simply hide/unhide the attributes so that they correspond with the selected tab.
In other words, all the data is sitting on the page and I am using jquery to just update the div classes to hide/unhide parts of the data. There is no Ajax being used as a result.
My question is, how would I do something like requiring a user to be signed in to be able to click on the tabs besides the default tab? How do you check if the user is signed in with just a jquery button like this and how would you do something like call a popup to appear asking the user to sign in?
Thanks!
In my application, I have a page with tabs that update the contents of a content area. I have it structured so that the content area holds data for multiple attributes of objects and the jquery tabs simply hide/unhide the attributes so that they correspond with the selected tab.
In other words, all the data is sitting on the page and I am using jquery to just update the div classes to hide/unhide parts of the data. There is no Ajax being used as a result.
My question is, how would I do something like requiring a user to be signed in to be able to click on the tabs besides the default tab? How do you check if the user is signed in with just a jquery button like this and how would you do something like call a popup to appear asking the user to sign in?
Thanks!
No comments:
Post a Comment