I have this situation
<ul> <li>something 1</li> <li>something 2</li> <li>something 3</li> </ul>
Then I have a script that adds some classes to the list above with something like this
<ul> <li class="item infocus">something 1</li> <li class="item">something 2</li> <li class="item">something 3</li> </ul>
ok, now I want to add some code when I click the infocus element but I cannot get control of it
I try with
$('.infocus').click(function () {
some code
});
but this works only with classes that are in the original html source code, not with added classes. Is it possible? Where is my error?

New Topic/Question
Reply


MultiQuote






|