added callbacks onBeforeClick, onAfterClick; impoved bootstrap example