I have a click function ...
$('.rx').children().on('click',function(){alert('got here');});
My divs (50 of these sets of divs per page) ...
<div class="rx"><div id="'.$data_string.'" class="'.$button_image_class.'"><a href="#" ></a></div></div>
(Each of them is a css sprite image button that sends $ data_string to the id of the process_me function. I replaced the call to process_me with a warning ('got here') for this question. FYI $ button_image_class is a variable, since a certain image is loaded depending from member account)
Everything works beautifully until I use pagination to load more of the above divs (another 50, exactly the same $ data_string bar, which is different in all divs).
The links to the sprite buttons in the first 50 divs work the way they should - clicking on their βhereβ prompts. However, links in recently downloaded sets do not work.
I guessed at first because the DOM does not collect new elements, but .on ('click', function () ... should collect future elements. So now I think it's something in
$('.rx').children().on('click',function(){alert('got here');});
What did I do wrong.
Is something sticking out there?
Shaun source share