tags:

views:

146

answers:

2

Hey there,

I'm working on a site which has a modal window (using boxy) with a form. Inside document ready I have the following to load up the modal window:

$("#confirm").boxy({title: "Title", modal: true});

Where the link is:

<a id="confirm" href="/confirm/">Confirm order</a>

And this runs fine where /confirm/ loads up a new html in the modal window.

But in the modal window I want to do some JQuery manipulations. But even simple things don't work. For example:

$("#link").click(function () {
  console.log('logging...');
});

Where "link" is the id on a link in the modal window, but when I click the link nothing happens. If I comment out the top and bottom lines (only have the console.log line it DOES log to the console...)

Everything works fine if I run this in a separate window. Am I missing something obvious?

Regards, AndriJan

A: 

I don't have much experience working with this plugin. But try adding your binding in the afterShow callback and see if it works. If it works, then there is an issue in the plugin that prevents from working your onload event

Teja Kantamneni
A: 

Please use live function at the same time, target the id of the "a href" youre using...

$("#confirm").live('click', function () {
  console.log('logging...');
});
Ryan