Adam - you have to bind the "jqmClose" class in the onLoad callback. Otherwise, the links are not there to be bound yet.

So you might have something like this:

$("#modaldiv").jqm({
     trigger: 'a.modal_link',
     ajax: '@href',
     onLoad: function() {
         $(this).jqmAddClose(".jqmClose");
   }
});

-- Josh


----- Original Message ----- From: "Mistraal" <[EMAIL PROTECTED]>
To: <jquery-en@googlegroups.com>
Sent: Wednesday, June 04, 2008 4:32 PM
Subject: [jQuery] jqModal question




Good evening, I'm having a relatively small problem using jqModal. (I hope)

I have a page that contains a form. This form contains an input box. A link
beside this input box opens a jqModal window, so far no problems.

In this modal window I show the results of a database search with
pagination. Pagination works wonderfully, updating a div inside the modal
window. Even onclick events on links in code received via AJAX appear to
work.

Well almost. This is where I have the problem.

It appears that the 'jqmClose' class is being ignored on these links. The
onclick event works perfectly, updating the input box in the form on the
parent page, however the modal window does not close nor does the overlay
disappear. Obviously clicking again on the overlay it disappears fine, but
I'd like this to happen when the user selects an item in the list.

How would I go about adding an inline script to my links so that not only
does it perform the onclick update element process, but also closes the
modal window and returns focus to the parent page?

Any thoughts would be gratefully received.

Regards,



Adam Frame
--
View this message in context: http://www.nabble.com/jqModal-question-tp17658960s27240p17658960.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.


Reply via email to