SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Content slide

  1. #1
    SitePoint Member ClaX's Avatar
    Join Date
    Jun 2006
    Location
    England
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Content slide

    Hi, i'm currently dabbling in a bit of jquery javascripting for a clients site. Not really done much in javascript so i'm stuck and need assistance...

    The part i'm stuck on is a horizontal slide effect for a whole block of content. It's hard to describe so for better understanding view where i am here http://cdldesign.co.uk/i/test2/

    What i'm after is for the far "Search Info" panel on the right to be hidden - when someone clicks the edit button at the top of the block the editable content slides in. I've managed to get it sliding ok but somehow need the editable block hidden from view until the "edit" button is clicked.

    Any help on how to achieve this is much appreciated.

    Thanks in advanced.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,696
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    You can use he hide and show methods.
    Additionally, the return false statements prevent the location bar from changing.

    Code javascript:
    $('#display-info .mt-title .fr a').click(function(){
    	$('#edit-info').animate({left:0}, 'fast').show('slow');
    	return false;
    });
    $('#edit-info .mt-title .fr a').click(function(){
    	$('#edit-info').hide('slow').animate({left:190}, 'fast');
    	return false;
    });
    $('#edit-info').hide();
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member ClaX's Avatar
    Join Date
    Jun 2006
    Location
    England
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks pmw57.

    Works great.


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
  •