![]() |
jquery problem Hey warriors, I have a login system to log users in. For this, I have built the login in a box with display:none in css. After clicking the log in button, the body's opacity is changed from 1 to 0.5 by jquery css() method. The login box appears by using the same css() method. But the problem is that the mouse still responses to the links in the body. So, I want that the links in my website cannot be clicked till the box is closed. Please tell me how to do it? Thanks in advance. |
Re: jquery problem Dont change the opacity of the body, creat a new div inside the body to cover the content. Code: //css |
Re: jquery problem If all you want to do is make the links in the main content area temporarily un-clickable, then you can simply do this... Code: $('.bodyLinks').attr('onClick', 'return false');Code: $('.bodyLinks').attr('onClick', 'return true'); |
Re: jquery problem If you want to make the rest of your page elements unclickable, you'll need to take Andrew's suggestion a little bit further. You'll want to make sure your overlay truly overlays the rest of the page content using z-index (notice 'position: relative' on the dialog box - browsers ignore z-index unless the container has a position other than 'static'). Also, if you don't want to clutter up your page HTML, you can use jQuery to add the overlay container... Code: //css |
| All times are GMT -6. The time now is 06:29 AM. |