简体   繁体   中英

Toggle tab for javascript/jquery

I am developing log-in panel for my web site. For that I have used single tab. First, it displayed "forgot username or password" in right corner of page. When the user clicks on this tab it displays "Remembered it? Sign in!" But the page should change to forgot pass word page.

Plz find below images(It has taken from http://www.picnik.com/app#/home/welcome )

Normal page:

在此处输入图片说明

After clicking on "Forgot your username" it should look like: 在此处输入图片说明

After that when I click on sign in it should navigate to the previous page which is username and password asked page.

it should in javascript or jQuery.

Thanks in advance

Just use box1.style.display = "block"; box2.style.display = "none"; box1.style.display = "block"; box2.style.display = "none"; on the "Remembered it" link and box1.style.dislpay = "none"; box2.style.display = "block"; box1.style.dislpay = "none"; box2.style.display = "block"; on the "Forgot it" one, where box1 is the login box and box2 is the password recovery box (which you can get with getElementById() ), and you're done.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM