Alexandre Plennevaux wrote:
> hello Brice!
>  
> i'm trying out the brand new version of jqModal!
>  
> i'm trying to do this:
>  
> whenever the page is loading, i would like display a modal window to 
> the user, saying "please wait...". When page has finished loading, it 
> should disappear.
>  
> I think jqModal can be of much help to do this, so i'm trying to make 
> it work.
>  
> i figured out i should add to all links that should launch a new 
> page, the class="jqModal" .
>  
> Right now, jqModal does not take into account the href value of the 
> link, would it be possible to allow this option of, let's call it, 
>  "redirection" to the link url?
>  
Alexandre,
  
  I may be a little confused but I think I understand your request, and 
it is certainly an interesting and useful one.

What I believe you want is to have a page that looks like;

<ul>
<li><a href="page1.html"></li>
<li><a href="page2.html"></li>
<li><a href="page3.html"></li>
</ul>

<div id="window">Please wait...</div>


Then clicking each link will display the content of the href inside 
window -- for instance clicking page2.html will will load page2.html 
into window, and then display it?


I currently don't support this... but think it may be helpful! :) 
Perhaps this syntax would make the most sense;

<script>
$('#window').jqm({
    ajax: '@trigger:href'
    trigger: 'li.a'
});
</script>

the ajax: '@trigger:href' means to load the ajax URL from the trigger's 
HREF attribute. This could be substituted for any attribute, like name. e.g.

<li><a href="#" name="page1.html"></li>

<script>
$('#window').jqm({
    ajax: '@trigger:name'
    trigger: 'li.a'
});
</script>


Maybe this should be shortened? e.g.
$('#window').jqm({
    ajax: '@name'
    trigger: 'li.a'
});

Another approach would be to allow a function to be passed as the ajax 
paramater (which I had before.. but ruled out as this can be 
accomplished via the on display callback) -- although the "trigger" is 
not passed to the callback.

Anyway... as you can see, things are still up in the air. I'd like to 
think this through before finalizing things. Perhaps you have a 
suggestion on how things should be done? I've forwarded this to the jQ 
list to ask for insight from the community. Plugin page; 
http://dev.iceburg.net/jquery/jqModal/

Cheers,

~ Brice

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to