I have something like so:
1) Using attr:
$("#frame").attr("width", "31");
2) Using DOM object:
$("#frame")[0].setAttribute("width", "50");