【问题标题】:jquery impromptu how to apply custom style on buttonsjquery即兴如何在按钮上应用自定义样式
【发布时间】:2015-04-02 03:14:34
【问题描述】:

我正在使用 jquery impromptu 作为我的模态确认框。我试图让我的提示按钮实现一个 css 自定义样式,以便在兼容模式下隐藏丑陋的按钮焦点。

如何修改下面的 $prompt 代码以应用下面的样式?

css 样式...

.hideFocus {
  /* get rid of internet explorer ugly focus in ie compatibility mode */    
  hide-focus: expression(this.hideFocus=true);  /* for ie 5+ */ 
  outline: none;  /* for firefox 1.5 + */
}

jquery 即兴代码...

var buttons = { };
buttons[recallOfFourWeeksOrMoreConfirmYesOption] = true;
buttons[recallOfFourWeeksOrMoreConfirmNoOption] = false;

$.prompt(recallOfFourWeeksOrMoreConfirm, {
    title: recallOfFourWeeksOrMoreConfirmHeader,
    buttons: buttons,
    persistent: false,      
    submit: function(e,v,m,f){
        if (v){
            $("#hiddenRecallFourWeeksOrMore").val("true");  
            form.submit();  
        }                                       
    }
}); 

谢谢

【问题讨论】:

    标签: jquery impromptu


    【解决方案1】:
    $.prompt(recallOfFourWeeksOrMoreConfirm, {
        buttons: {"mybuttton": true}
        classes: {button: "myclass"}
        .....
    }
    

    然后将样式添加到该类myclass

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-21
      • 2016-11-17
      • 1970-01-01
      • 2015-10-04
      相关资源
      最近更新 更多