views:

264

answers:

1

hello everyone!

I have a website.. with three div columns, colA colB and colC.

on colA i have a menu that triggers some ajax functions to load text on colC and thumnails on colB.

it works perfect.. here it is a piece of code.

var loading = $(".loading");
var content = $("#colC");   
var thumbs = $("#colB");

    $("#menu li a").click(function(){ 

    showLoading();

 switch(this.id){
    case "home":
     content.load("content.php #home", hideLoading);
 thumbs.load("products.php #prodA", hideLoading);
     break;

    case "about":
     ....
     break;

    case "...":
     ....
     break;

    });

the problem is.. that #prodA from products.php brings to the website new jquery functions (thickbox) and they doesn´t work at all.

i tried this:

$("#menu li a").live("click", function(){

and nothing happened..

then i tried using the js file for livequery:

$("#menu li a").livequery("click", function(){

and nothing happened neither.

so.. i'm all ears to hear from you guys to help me solve this.

Thanks in advance!!

A: 

Thickbox plugin is registering all the 'thickbox' page elements at run time. If you dynamically add elements later they wont be triggered by the thickbox call. I had a similar discussion here.

Elzo Valugi