Ok, a little bit simplier (and lighter) than JQuery is .. JAVASCRIP ITSELF of course !
If you need to change dynamicaly your canvas dimensions, just use:
document.getElementById('yourcanvasid').setAttribute('width', aWidth);
document.getElementById('yourcanvasid').setAttribute('height', aHeight);