Pergunta

The following statement works fine with the exception that the width of the modal message is 400px, the default, instead of the desired 800px.

$.prompt(sFirstTest,{width:800});

The default of 400px is fine except for this one instance. The question is how do I best override the default for the one instance?

Foi útil?

Solução

The answer was right in front of me in the documentation all the time. In the Impromptu css there is:

div jqi {
    width:400px;
    .....
}

So I set up an alternate:

div jqiwide {
    width:800px;
    .....
}

Then the call to Impromptu for a wide instance is:

$.prompt(sFirstText,{prefix:'jqiwide'});

Outras dicas

And make sure to duplicate impromptu.css declarations with your new prefix, as they are not prepared for Id and classed with new prefix.

.customStyling div.jqi{
    width: 800px;
}

var dialogOptions = {
    buttons: [{...},{...}],
    classes: "customStyling"
};

$.prompt("msg", dialogOptions);
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top