fix demo bug and make flexible dots menu

fix demo bug and modify Xieyu's previous islider_index.js plugin to make it more flexible for developers