attribute setting - js