Igor Spasic wrote:
Hellooo -
Excellent plugin! Gem.
would you be so kind to let me know what is the best practice for
following situation:
I have a part of page that is loaded using ajax. Page contains lot of links.
Each link needs to become a trigger for specific dialog.
I do have onPageLoad() call back that is invoked when all ajax content
is loaded. For now, I put there the standard init code:
-----------------------------------------------------------
$('#ex2').jqm({
trigger: $('a.popupTrigger', repager.content),
....
});
-----------------------------------------------------------
Is this the best possible solution? I wonder if jqModal maybe caches
triggers between reloading pages? #ex2 is some dialog div loaded with
the ajax content.
Thank you in advance!
/Igor
Igor,
Your method could work, although existing triggers are being
re-initialized. You may want to do something like the following UPON
AJAX LOAD;
$('#ajaxLoadedContent a.trigger').click(function(){
$('#ex2').jqmShow();
});
where ajax loaded content looks like;
<div id="ajaxLoadedContent">
<a class="trigger">open dialog</a>
<a class="trigger">open the same dialog</a>
...
</div>
Hope this helps,
~ Brice
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?