jQuery simplemodal closeHTML问题 [英] jQuery simplemodal closeHTML issue

查看:91
本文介绍了jQuery simplemodal closeHTML问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到一个问题,当使用 jquery.simplemodal 初始化模态窗口时,插件.

I'm having an issue where when initializing a modal window using the jquery.simplemodal plugin.

如果没有closeHTML选项,则模式窗口的格式正确.

With no closeHTML option, the modal window is formatted properly.

$.modal(html, {});

但是,如果我指定closeHTML,则模式窗口的格式设置为适合带有滚动条的几乎10x10像素的正方形.

However, if I specify closeHTML, the modal window is formatted to fit in nearly a 10x10 pixel square with scrollbars.

$.modal(html, {
    closeHTML: '<a href="#close">Close</a>',
});

有人遇到过这个问题,对修复有任何想法吗?

Has anyone run into this issue and have any idea for a fix?

相关规格为:

  • Ubuntu x86_64上的Chrome8
  • jQuery 1.4.4
  • jquery.simplemodal 1.4.1

推荐答案

我能够解决此问题.我只是从<a class="modal-close">Close</a>中删除了文本,并使用了<a class="modal-close"></a>和一个CSS背景图像.所以说真的,如果您想在<a>中使用文本,例如"x"或"close",这并不能解决您的问题,而只是避免了该错误.也许这可以帮助Eric发现问题.

I was able to work around this issue. I just removed the text from the <a class="modal-close">Close</a> and went with <a class="modal-close"></a> and a css background image. So really, if you want to use text in your <a>, like "x" or "close" this doesn't solve your problem, it just avoids the bug. Maybe this helps Eric spot the issue.

  • jQuery 1.4.4
  • jquery.simplemodal.1.4.1

这篇关于jQuery simplemodal closeHTML问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆