noob231454 noob231454 - 7 months ago 16
Javascript Question

Multiple html stuff stuff stuff

I have jquery code that successfully replaces a whole column of buttons (when one is clicked) with a short html line "new html

Answer

if I understand the question correctly it sounds like you want to do something like:

$(document).ready(function() {
  $('a').click(function(){myFunction()});
});
function myFunction() {
  $('#stuff').empty().append("<p>new html</p>")
}
Comments