Your original answer is incorrect. What you want to do is set up advanced binding after loading the AJAX content, not the click. Here's the pseudo code.
$.get('...' function(d) { $('#dynamiclongp').text(d).expander(...); });
What happens is that .expander is called every time you click on a hidden div tag. I'm not sure when you load your dynamic data, but you want to bind the expander once and only once right after setting the content.
If for some reason the AJAX callback function is not available, just make sure that you only bind your event once.
var bound = false; $('div.tags-hidden').live('click', function() { if(!bound) { $(this).find('p').expander(...); bound = true; } });
source share