English 中文(简体)
改变 j格方言,影响纽托邦的高度
原标题:Changing the text on a jquery dialog button affects button height

我有 j格式方言,在被点击后,我正试图改变在纽芬兰文上的案文。 因此,例如,Sendhton被改为Sending...,在被点击时残疾。

所有这一切都造成了罚款,有一个问题:纽特州失去了所有内部婚礼,而纽特州边界则在案文上 right。

$( #email-dialog ).dialog({
    autoOpen: false,
    height:  auto ,
    width:  auto ,
    modal: true,
    buttons: {
        "Send": function() {
            $(".ui-dialog-buttonpane button:contains( Send )").button("disable");
            $(".ui-dialog-buttonpane button:contains( Send )").button().html( Sending... );

            $.ajax({
                type: "POST",
                url: post_path,
                data: form_data,
                dataType:  JSON ,
                success: function(data) {
                    if (data.success) {
                        $("#email-dialog").dialog("close");
                    } else {
                        updateErrors(data.errors);
                        $(".ui-dialog-buttonpane button:contains( Sending... )").button("enable");
                        $(".ui-dialog-buttonpane button:contains( Sending... )").button().text( Send );
                    }
                },
                error: function(XMLHttpRequest, textStatus, errorThrown) {
                    alert( Error:   + textStatus +     + errorThrown);
                    $(".ui-dialog-buttonpane button:contains( Sending... )").button("enable");
                    $(".ui-dialog-buttonpane button:contains( Sending... )").button().text( Send );
                }
            });

        },
        Cancel: function() {
            $(this).dialog("close");
        }
    },
    close: function() {
        allFields.val("").removeClass("ui-state-error");
    }
});

我已尝试采用html和(或)案文两种方法。 我在这里找不到确实显而易见的东西?

最佳回答

如果在纽特州看到html,你实际上通知你,在<代码><span>内有“<><button>标签。

<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false">
    <span class="ui-button-text">Send</span>
</button>

为了让你们的法典发挥作用,你可能要做这样的事情:

$(".ui-dialog-buttonpane button:contains( Send ) span").text( Sending... );

EDIT: As per mmcnickle s comment, it looks like the jQuery UI Button has a label property that you can use. E.g.

$(".ui-dialog-buttonpane button:contains( Send )").button( option ,  label ,  Sending... );

http://jsfiddle.net/cvallance/JeBsQ/"rel=“nofollow> jsFiddles in action

j Query UI Button Label Documentation

问题回答

页: 1 备选办法:

$( #button_id ).button( option ,  label ,  New button text here )




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签