Bootstrap使用Javascript显示模态框后页面上移
来源:互联网 发布:大数据意义包括哪些 编辑:程序博客网 时间:2024/05/22 00:09
Bootstrap使用Javascript显示模态框后页面上移
解决办法:
添加data-toggle="modal"
。虽然少了这个属性模态框仍然会弹出,但是如果这个时候页面在垂直方向有滚动条,页面就会向上移动。本来以为是用js来显示模态框就可以不需要这个属性了,结果掉到坑里去了。
<a href="#" class="btn btn-xs btn-default edit-note" data-toggle="modal" >编辑批注</a>
$('.edit-note').on('click', function() { $.ajax({ url: '/feedback/getNote', type: 'post', dataType: 'Json', async: false, data: { 'feedbackId': fbId }, success: function(data) { console.debug(data); if (data.IsSuccess) { noteEditor.html(data.Result); $('#noteModal').modal({ show: true, backdrop:false }); } else { alert(data.ErrorMsg); } }, error: function() { alert('获取批注失败'); } }); });
0 0
- Bootstrap使用Javascript显示模态框后页面上移
- bootstrap基本显示页面
- bootstrap基本显示页面
- 页面引用bootstrap报错Bootstrap's JavaScript requires jQuery
- 使用 javascript HTML DOM 高亮显示页面特定字词
- 使用javascript代码来让页面显示时间
- 使用JavaScript异常在页面显示错误提示的方法
- 使用javascript将页面中的关键字高亮显示
- 【JavaScript】Bootstrap自动显示/隐藏菜单栏
- bootstrap页面布局和页面中的日历显示
- javascript——移动端input,textarea输入框获得焦点页面上移
- bootstrap table当前行 上移 下移
- 显示页面中的链接(javascript)
- JavaScript使页面全屏显示
- javascript在页面显示时间
- javascript 页面打开全屏显示
- [javascript]页面显示动态时间
- bootstrap 之tab页面的使用
- 检查Linux服务器性能
- ajaxFileUpload带参数提交
- json数据和bean之间的转换
- Android studio中某些快捷键
- OUVa 232 Crossword answer
- Bootstrap使用Javascript显示模态框后页面上移
- Hexo+Github Pages如何搭建并异地管理Blog
- 防火墙iptable的原理
- c++指针初识
- Java 8新的时间日期库
- [ASP.NET MVC]Entity Framework框架之CodeFirst数据迁移
- 开发板上syslog使用方法小结
- angular-模块-启动
- Summary Ranges