开发者

How to load jQm modal on page load?

Hi I am using jQm Window to load modal window.

http://dev.iceburg.net/jquery/jqModal/#how

i am trying to

jqmShow
    Show开发者_如何学C jqModal element(s).

    $('#dialog').jqmShow();
    $('.dialogs').jqmShow();

but it throws some JS error,

but it does not load on the page load, please guide me for the same.

TIA


Seriouly why do you have to make life complicated for yourself? Just put a div on your page that is hidden that floats in the center like this

<div style="position: absolute; top:50%; left:50%;" hidden="true" id="Messagee">
//Your Message or Html Here
</div>

and then when you need to show it have a function that does

$("#Message").html("<p>My Message</p>"); 
$("#Message").show(); 

You don't need a crazy javascript module that does modals, you can really make your life easy. Oh and if you want some nice effects use the $("#Message").fadeIn(500); instead!


I got the answer , it was quite easy using jqmShow();

$('#alert-box').jqm({ajax: 'alert-note.html' , modal:true});
$('#alert-box').jqmShow();

:)

thank you all for the help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜