Alexandre Plennevaux wrote:
> <script type="text/javascript">
>
> function alert() {
> $('#ex1a').jqm();
> }
>
> $().ready(function() {
> alert("hello world");
>
> });
> </script>
>
>
That wouldn't work as it would never execute the trigger. If you set the
autofire parameter, it *may* work ONCE; e.g.
---
function alert() { $('#ex1a').jqm({autofire:true});}
$().ready(function() {alert("hello world");});
---
Here is my version (which works);
---
<a href="#" id="alertTrigger">Show Last Alert</a>
<div id="alert" style="color: red; background-color: white; padding:
10px;"></div>
<script type="text/javascript">
function alert(i) {
$('#alert').html(i);
$('#alertTrigger').click();
}
$().ready(function(){
$('#alert').jqm({trigger: '#alertTrigger'});
alert('This is a test');
});
</script>
---
I guess it's time to start styling a alert dialog ;)
~ Brice
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/