Config responsive layout using JS