3

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?

skaffman
  • 398,947
  • 96
  • 818
  • 769
Terry
  • 1,437
  • 2
  • 12
  • 26
  • Try adding a "px" $.prompt(sFirstTest,{width:"800px"}); – KBN Apr 29 '12 at 06:50
  • @xFortyFourx Thanks for the suggestion. I had actually tried that, and just to make sure I tried it again, but the result was the same: no error indication but no change either. – Terry Apr 29 '12 at 17:46

3 Answers3

4

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'});
Terry
  • 1,437
  • 2
  • 12
  • 26
0

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

Jonas G. Drange
  • 8,749
  • 2
  • 27
  • 38
Omid
  • 504
  • 1
  • 7
  • 14
0
.customStyling div.jqi{
    width: 800px;
}

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

$.prompt("msg", dialogOptions);