I'm going mad trying to figure out why my code won't work. 

I am setting an li element with an active class, which works..

i then want to select that li element which has class 'active' - and give it a click function that slides another div into view, which is also identified by the class 'active'

here is my code:

```
$(".contentPanel").click(function() {
  $(this).siblings().animate({height: minHeight,},500).removeClass("active");
  $(this).animate({height: maxHeight,},500).addClass("active");
  $('li').removeClass("active");
  $(this).children('ul').children('li').addClass("active");
  $('.infoPanelSlider').removeClass("active");
  $(this).children('.infoPanelWindow').children('.infoPanelSlider').addClass("active");
});

```

The above works, the li elements inside the active 'contentPanelSlider' are given the class active. 

The next bit is where i"m stuck:

I want to write this:

$('li.active').click(function().... do something

but the 'active part doesnt seem to work - it works if i just target the 'li', without the active class selector...

I'm wondering if this has something to do with the fact that the active class was added by JQuery on the fly, and not hard coded in the stylesheet - but this is a complete guess..

Please help if you can, I dont mind getting flamed...