width changes in js