Added onChange method to options

Just added a simple onChange option, as I needed it in my project.