MarketerX Regular Member Joined Mar 7, 2010 Messages 404 Reaction score 125 Jun 11, 2011 #1 Hello BHW, I am wondering how to show/hide divs after a user clicks a "like button" on my page. I want div1 to hold my like button, and when it is clicked to be replaced with div2. Hope this makes sense, I know jquery is involved...
Hello BHW, I am wondering how to show/hide divs after a user clicks a "like button" on my page. I want div1 to hold my like button, and when it is clicked to be replaced with div2. Hope this makes sense, I know jquery is involved...
J johnsmith21 Newbie Joined Sep 23, 2009 Messages 18 Reaction score 6 Jun 11, 2011 #2 Something like this. $(document).ready(function(){ $('#likebuttonID').click(function(){ var div2html = $('#div2ID').html(); $('#div1ID').html(div2html); }); });
Something like this. $(document).ready(function(){ $('#likebuttonID').click(function(){ var div2html = $('#div2ID').html(); $('#div1ID').html(div2html); }); });
MarketerX Regular Member Joined Mar 7, 2010 Messages 404 Reaction score 125 Jun 11, 2011 Thread Starter Thread Starter #3 johnsmith21 said: Something like this. $(document).ready(function(){ $('#likebuttonID').click(function(){ var div2html = $('#div2ID').html(); $('#div1ID').html(div2html); }); }); Click to expand... I want Div1 to be hidden/Div2 to be shown when the Event.Subscribe facebook event is fired...can you help??
johnsmith21 said: Something like this. $(document).ready(function(){ $('#likebuttonID').click(function(){ var div2html = $('#div2ID').html(); $('#div1ID').html(div2html); }); }); Click to expand... I want Div1 to be hidden/Div2 to be shown when the Event.Subscribe facebook event is fired...can you help??
C cyanide77 Newbie Joined May 25, 2009 Messages 31 Reaction score 3 Jun 11, 2011 #4 Using JS for it is the best method to smoothly transition from div to div.