I would have to see your code, but may I suggest the following --
As it's a bad idea to run $.jqm() multiple times on the same
element, we'll need to use an onLoad callback to perform the ajax-
based population of the modal window.
To do so, follow this example:
[!-- Markup --!]
<div id="modal" class="jqmWindow">
<div class="modalTop">
<div class="jqmClose"> ../images/btn/btn_close.gif </
div>
</div>
<div class="target"></div>
</div>
<a href="this.htm" class="trigger">This</a>
<a href="that.htm" class="trigger">That</a>
[!-- JS --!]
$('#modal').jqm({
trigger: '.trigger',
onLoad: determineAjaxURL});
/**
* determineAjaxURL: examines the triggering element's HREF, and
loads
* the content of this URL into the modal window.
*
* Called as a jqModal "onLoad" callback
*
* jqModal passes the "hash" to this function to callbacks -- see
the
* README for more info (http://dev.iceburg.net/jquery/jqModal/
README)
*/
var determineAjaxURL = function(jqmHash) {
// determine URL
var URL = jqmHash.t.href; // t is DOM reference to the triggering
element.
// load URL content into modal window
$('div.target',w).load(URL); // w is a jQuery object reference to
the modal window.
};
[!-- end --!]
Let me know if this helps clarify some things about jqModal. My
apologies for the delay in response!
~ Brice
On Jul 11, 6:26 pm, rolfsf <[EMAIL PROTECTED]> wrote:
> I have a page on which I've hidden a div for use as an adaptable modal
> window:
>
> <div id="modal" class="jqmWindow">
> <div class="modalTop">
> <div class="jqmClose"> ../images/btn/btn_close.gif </div>
> </div>
> <div class="target"></div>
> </div>
>
> I have 2 different types of triggers, for which I want to load 2 different
> urls into thejqModal'target'... let's call them:
> .typeA ----> this.htm
> .typeB ----> that.htm
>
> I can get either of these to work, but not both at the same time:
> $('#modal').jqm({ajax: 'this.htm', trigger: '.typeA', modal: 'true', target:
> '.target'});
> $('#modal').jqm({ajax: 'that.htm', trigger: '.typeB', modal: 'true', target:
> '.target'});
>
> What's the correct construction to get the both working on the same page?
> --
> View this message in
> context:http://www.nabble.com/jqModal-help%3A-multiple-triggers%2C-different-...
> Sent from the JQuery mailing list archive at Nabble.com.