Added minWidth option and placed scroll event trigger within snippet