Ask Toolbar preventing Bootstrap Modal to show

邮差的信 提交于 2019-12-05 16:06:22
|improve this question

Ravi,

You can get rid of inline styles added via APN toolbar with following scripts. You have to call this script on modal shown function.

$('#myModal').on('shown', function () {
  $(".modal").css("top", "");
})

Passing null ("") value to "TOP" CSS property, jQuery will remove that from the given selector.

I couldn't replicate this on JSFiddle as Result aria is iframe. Here you can download working version: https://dl.dropboxusercontent.com/u/30070004/apn-modal/index.html

I tried to remove those attributes as well, like:

$(".modal").removeAttr("data-apn-toolbar-adjusted data-apn-tb_demo_v7-toolbar_set data-apn-tb_demo_v7-toolbar_set_top");

But as soon as you remove these - apn toolbar again adds it with newly calculated styles. So better not to remove those attributes but only the "TOP" value.

Let me know your result!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!