- Have 5 pages
- Each page has a link for "Sign-in/Log-in" on the topbar
- Lets say user is on "HomePage" and he clicks "Log-in" button on the topbar
- I want "Homepage" to go in background (opacity=0.2) and put the "Log-in" pop-up in front (z-index: 100)
- Same behavior is expected for all 5 pages -
我所做的是这样的:
-----------------Page 1----------
div.HomePage
div.accountPage
-----------------Page 2----------
div.BrowsePage
div.accountPage
-----------------Page 3----------
...
然后我在运行时使用 javascript 设置 opaqueness 和 z-index 属性。我在每个主页的 HTML/jade 中重复 accountPage 的代码 5 次,而且对于这种方法,javascript 代码看起来也不干净。
- What I want is to create a TOTALLY SEPARATE "accountPage",
- Display on it click of "Login" button.
- Find out which of the 5 main pages user was on **/* This I dont know how to do */**
- Set that main page to background with opacity = 0.2
- Popup the accountPage for Login in front.
- After Login or cancel, bring the main page (user was on), back to focus
请帮忙。