Force JQuery Dialog Title to Multiple Lines

前端 未结 2 1221
旧巷少年郎
旧巷少年郎 2021-01-16 10:02

How can I force a jQuery Dialog\'s Title to always be two lines?

See this: http://jsfiddle.net/VKcJ7/24/

I know the dialog title is contained in a span, so

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-16 10:51

    I ended up using the answer of this question (thanks @jazZRo): Using HTML in a Dialog's title in jQuery UI 1.10 to extend the widget.

    I then set my title as follows: (Working example: http://jsfiddle.net/VKcJ7/30/)

    JS:

    $(document).ready(function () {
        $('#dialog').dialog({
            autoOpen: false,
            modal: true,
            title: 'SOME ITEM 
    Remaining Qty (Cts.): 0' //adding the newline character \n is ignored... }); });

提交回复
热议问题