Multiple html stuff stuff stuff

时间:2016-02-03 03:38:40

标签: javascript jquery html css

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

new html

1 个答案:

答案 0 :(得分:0)

如果我正确地理解了这个问题,那么听起来你想做的事情就像:

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