I need to store a block of html code from one element as a jquery variable and then copy it into another element upon click. This is the code I use:
var $regForm = $('#regForm').html();
$('#btn-signup').tap(function(){
$('#register').css({'marginLeft':'0px'});
$('#register .ext').html($regForm);
});
When viewing the updated source I can see that the code is copied into the div correctly, but the problem is the elements do not show up on screen and I can’t figure out why. Anyone have any ideas?
Try this: