Arne-Kolja Bachstein wrote:
> Hi there,
>
> is there a simple way to trigger a jqModal "window" without a trigger or
> use the $(document).ready() as a trigger? I would like to open it
> whenever the home page is loaded (well, with some cookie thingys so it
> only appears for the first load)... but just putting it into
> $(document).ready() without the trigger parameter doesnt work...
>
Arne,
Use the "autofire" parameter to accomplish this. When the autofire
parameter is passed as TRUE, jqModal will automatically execute the
"open" function (assigned to the triggers) WITHOUT having to click a
trigger. E.g.
$('#notice').jqm({autofire:true}); // will open #notice as soon as this
code is evaluated
TO BE SAFE; I recommend encasing this in a $().ready() function --
that way you can be sure the triggers & dom elements, & whatever else
jqModal needs is in place.
~ Brice
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/