Change body html with jQuery

html, javascript, jquery

Solution

$('#buttonId').click(function(){
     $('body').attr('ontouchmove', "BlockMove(event)")
})

Or even better, don't change the DOM structure, just bind the the callback to the event:

$('#buttonId').click(function(){
     $('body').bind('touchmove', BlockMove);
});

Problem

How can I change the html of the body tag with jquery. I have this body tag `<body>` When I click on a button, the body must change to `<body ontouchmove="BlockMove(event);>` How can I make that with `jquery` and `javascript`?

Original source