Ok I just fixed this with my own answer to someone else's question.

Instead of adding the .click to the anchor, I instead added the
trigger like this:

$("#modal").jqmAddTrigger("a.jqModal")

Worked like a charm

On May 11, 11:30 am, Bradley <bradleyrobert...@gmail.com> wrote:
> Can anyone help me with inserting newjqModallinks?
>
> On May 6, 3:06 pm, Bradley <bradleyrobert...@gmail.com> wrote:
>
> > I read a bit on the newjqModalversion that has live events on the
> > a.jqModal (Actually reading this didn't tell me whether live events
> > were enabled on .jqModalby default, or if you had to make the call
> > shown in the code, but that's neither here nor there)
>
> > So, I have a control panel list users of a system.  The user name is
> > an a.jqModallink to their href /users/xx/edit which is loaded through
> > an ajax call using this code:
>
> > $(function(){
> >         $("#modal").jqm({ajax:'@href'})})
>
> > and
> > <a class="jqModal" href="/admin/users/35/edit">Admin User</a>
>
> > Adding a user is done through a modal window.  It submits through an
> > ajax call, retrieves the user partial (rails) back from the db, and
> > appends it to the list of users.
>
> > The only problem is, the link now redirects to the href rather than
> > loading it through ajax for that newly appended user.  I tried adding
> > this:
>
> >         $("a.jqModal").click(function(){
> >                 $("#modal").jqmShow();
> >         })
> > After my append of the new row.  This sort of works, in that when you
> > click that new user, the overlay pops up and would most likely load
> > the content, but it still redirects.  It's like it's missing a return
> > false; somewhere in there.
>
> > Anyone else have this problem with appending new data through jscript
> > that usesjqModal?

Reply via email to