Jquery 如何对多个主页使用同一子页
我所做的是:Jquery 如何对多个主页使用同一子页,jquery,html,css,Jquery,Html,Css,我所做的是: - 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
- 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 -
然后,我在运行时使用javascript设置不透明性和z索引属性。我在HTML/jade中为每个主页重复accountPage的代码5次,而且javascript代码看起来并不干净
-----------------Page 1----------
div.HomePage
div.accountPage
-----------------Page 2----------
div.BrowsePage
div.accountPage
-----------------Page 3----------
...
请提供帮助。这听起来像是iframe或基于ajax的模式弹出窗口的完美候选。有许多可用于jQuery。。。正好是我现在最喜欢的 以下是它如何与colorbox配合使用:
(注意:这可以使用window.location.href
以编程方式完成,这样您就不必将当前URL硬编码到每个链接中)让我试试这个。感谢您的快速回复。
- 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