PhilipK Posted June 28, 2011 Share Posted June 28, 2011 Hello I'm creating a javascript based survey which shows different answers based on the person's answers. I have working script for showing the answer based on input. $(".yes").click(function () { $(this).parent().next("p").show("fast"); }); $(".no").click(function () { $(this).parent().next("p").next("p").show("fast"); }); I need to edit this so ... $(this).parent().next("p") is appended to the end of a new variable called Message. Any ideas on how to approach this? Link to comment https://forums.phpfreaks.com/topic/240642-jquery-append-to-value/ Share on other sites More sharing options...
Adam Posted June 29, 2011 Share Posted June 29, 2011 I don't see the connection between appending and show()ing the next sibling? Link to comment https://forums.phpfreaks.com/topic/240642-jquery-append-to-value/#findComment-1236185 Share on other sites More sharing options...
PhilipK Posted June 29, 2011 Author Share Posted June 29, 2011 I don't see the connection between appending and show()ing the next sibling? The sibling which is shown also needs to be added to the variable 'Message'. Link to comment https://forums.phpfreaks.com/topic/240642-jquery-append-to-value/#findComment-1236270 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.