SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Addict Smolf3d's Avatar
    Join Date
    Aug 2004
    Location
    russia
    Posts
    232
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Little help with jQuery

    First of all i found this Simple and effective dropdown login box

    I upgrate sing up box.

    Now i have Login and Sing up dropdown box, but i have problem

    When i click on Login (activate) and after this i click on Sing up (activate second box) , the login box don't up (not deactivated), now 2 box's is opened (activated)

    I need if activated one of them, the second deactivated.

    Here is the jQuery code (copy past)

    Code JavaScript:
    $(document).ready(function(){
    	    $('#login-trigger').click(function(){
    	    $(this).next('#login-content').slideToggle();
    	    $(this).toggleClass('active');					
     
    	if ($(this).hasClass('active')) $(this).find('span').html('▲')
    		else $(this).find('span').html('▼')
    	});
    /*----------------------------------------------------------------------------*/
    	    $('#registr-trigger').click(function(){
    	    $(this).next('#registr-content').slideToggle();
    	    $(this).toggleClass('active');					
     
    	if ($(this).hasClass('active')) $(this).find('span').html('▲')
    		else $(this).find('span').html('▼')
    	});
    });

    Thanks and sorry for my english

  2. #2
    SitePoint Addict Smolf3d's Avatar
    Join Date
    Aug 2004
    Location
    russia
    Posts
    232
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I forgot, here is example how it work now http://jsfiddle.net/ZcVCK/2/


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •