Bootstrap Dynamic Modal

I've been trying to do the dynamic modal with the twitter bootstrap like so: $('#myModal').on('hide', function () { $(this).removeData('modal'); $('.loading-modal').remove(); }) It does reload the data in the modal each time I click on the button but... What I noticed is that after closing the previews modal, when I open the next modal the previews data is still shown and after a few seconds it is updated with the new data. What I wanted is that everytime the modal is called it will set the data to "Loading..." then display the new data. How can this be achieved? Or is there a better approach? ---- **Update** This is how I'm calling the remote data for the modal using `data-remove=` The modal
When you say you are "loading data" what do you mean? Are you loading data via Ajax?

以上就是Bootstrap Dynamic Modal的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏