1 (edited by avtor-tour 2013-02-02 10:26:14 AM)

Topic: lytebox modal windows

Hi, I encountered with a little issue, I've added lytebox and used it with ajax, but the problem was that Lytebox gets initialized during page load.
I found solution, but how to apply it while I don't understand smile.
Here is the example by jquery:

$.ajax({
type: “POST”,
url: ajax.php”,
data: dataString,
cache: false,
success: function(html){
$(“#ajaxdata”).prepend(html);


///// Lytebox
  initLytebox(); /// add there your lytebox function to work
}
});

Excuse me, for that question smile







////////////////////////////////
the problem solved by adding $this->_obj_response->includeScript("public/js/cities.js"); into the function
and in file of cities.js I wrote  myLytebox.updateLyteboxItems();