Hey Martin, On Wed, 9 Jun 2010 15:19:23 +0800 Martin Aspeli <[email protected]> wrote:
> We can't get the third bullet point working. When the user clicks a > regular link in the overlay, it results in a normal page load. We > tried some crazy re-binding with prepOverlay() etc, but that got > nowhere. I think you should do the rebinding in the callback function of load(), supposing you are using code similar to that of jqtools example. I'm not sure if setting a callback does inhibit the default behaviour, though, as http://api.jquery.com/load/ is not so clear on this. However, you can do wrap.load(url, function(response, status, xhr) { wrap.empty(); $(response).appendTo(wrap); $('a', wrap).click(function(e) { e.preventDefault(); }); }); for example to inhibit the click. I sometimes find myself making lots of mistakes in JS due to not keeping into account the asynchronous nature of it. It's Twisted programming in the browser ;) Hope it helps -- Simone Deponti Abstract Open Solutions [ http://www.abstract.it ]
signature.asc
Description: PGP signature
_______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
