mootools 1.1 and modal windows?

a place to get help

Moderator: 1.1 Moderators

mootools 1.1 and modal windows?

Postby danielsd on Mon Feb 15, 2010 8:12 pm

Hey guys,
I'm working with joomla 1.5 and mootools 1.1 - I don't have the option to upgrade to 1.2 .

I'm trying to make a modal window (dim the background of the browser window and show a popup with some info in it).

For this purpose I have added the following code to the head:
  1. window.addEvent('domready', function() {
  2.  
  3.             SqueezeBox.initialize({ size: { x: 350, y: 500}});
  4.  
  5.             $$('a.modal').each(function(el) {
  6.                 el.addEvent('click', function(e) {
  7.                     new Event(e).stop();
  8.                     SqueezeBox.fromElement(el);
  9.                 });
  10.             });
  11.         });
  12.  


in my body I have a div
  1. <div><a class="modal">link</a></div>


everything works perfect! But there is a problem. The content in the div can be loaded dynamically. I have page browser that makes an ajax request and delivers new content in the div. When I go to page 2, then I have
  1. <div><a class="modal">link page2</a></div>


and the modal window doesn't function anymore. Is there any way to tell the dom to look for changes?
danielsd
 
Posts: 2
Joined: Mon Feb 15, 2010 5:10 pm

Re: mootools 1.1 and modal windows?

Postby danielsd on Tue Feb 16, 2010 12:29 pm

Anyone?
danielsd
 
Posts: 2
Joined: Mon Feb 15, 2010 5:10 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest