【问题标题】:Problem with jquery replacement of form input for cufon use in IE 8在 IE 8 中使用 cufon 的 jquery 替换表单输入的问题
【发布时间】:2011-09-13 09:56:34
【问题描述】:

我有 4 个输入按钮,我想用 cufon 替换。我阅读了有关 stackoverflow 的策略,该策略涉及隐藏输入字段并显示具有相同内容的跨度,以便 cufon 可以替换它。我让它在 chrome、firefox 和 IE 9 中工作,但在 IE 8 中,没有什么可以替代隐藏的 div。这是我正在使用的代码

$(document).ready(function() {
        $('#utmodes input').each(function(){
            $(this).hide().after('<span id="' + $(this).attr('id') + '" class="input-button">').next('span.input-button').addClass($(this).attr('class')).text($(this).val()).click(function(){
            $(this).prev('input').click();
            Cufon.replace('#utmodes span', {
                hover: true
            });     
        });
});

实际页面是http://tinyurl.com/3zvjvgl。 4 个输入字段是“文件上传”、“flash 上传”等。在 ie 8 中,您将看到这 4 个输入所在的空白点。

【问题讨论】:

    标签: jquery internet-explorer cufon


    【解决方案1】:

    发现问题。我使用 .after()

    关闭了我添加的跨度标签

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-03
      • 2013-05-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-17
      相关资源
      最近更新 更多