1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Before and After

Discussion in 'JavaScript' started by m u r, Mar 11, 2010.

  1. #1
    I have two images, a before and after. I was hoping to rollover the "after shot" where a little button pops up in the center where you can click on "after" which swaps the "after" image with the "before" image. Any idea how to do this?
    SEMrush
     
    m u r, Mar 11, 2010 IP
    SEMrush
  2. !Unreal

    !Unreal Well-Known Member

    Messages:
    1,671
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    165
    #2
    
    $('#button').click(function(){
    	$('#img').src('after.png');
    });
    
    PHP:
     
    !Unreal, Mar 12, 2010 IP