bmsterling wrote:
> hey,
> I am working with the jqModal and I am trying to set a button in the frame
> to close it. This is what I got:
>
> $('.jqmWindow').jqm({
> trigger: elem,
> ajax: $(elem).attr('href'),
> overlayColor: '#fff',
> overlay: 30
> },
> function(h){
> $('#cancel_bt').click(function(){
> $(this).jqmClose();});
> h.w.show();
> },
> function(h){
> h.w.jqmClose();
> });
>
> The button is set up like so:
>
> <button id="cancel_bt">cancel</button>
>
> and the page is being pulled in via ajax.
>
> Thanks
>
Benjamin,
The button must be given the class "jqmClose" in order to receive the
close event when the dialog is displayed. As of now (r5), the "close
class" cannot be changed -- and is static as "jqmClose". Karl Rudd has
contributed some changes to allow a assignable "close class". I'll be
including these in a new revision - soon to be released.
Your button should look like;
<button id="cancel_bt" class="jqmClose">cancel</button>
Hope this helps,
~ Brice
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/