debugging jquery issues for modal