Problem
You successfully add result to #s-results :
$('#s-results').html(result).show();
And then tried to select #se2 from the added results , like this, without success:
$(result).filter('#se2');
This did not work because you did not get it from the dom added in the second step.
In fact, it creates a new untethered dom with the same result variable.
Decision
To select #se2 from the added result content, try the following:
$('#s-results').filter('#se2');
Or, as @zerkms suggested, you can select it directly through:
$('#se2');
These features will work, because now it refers to what is bound to dom, which will look for the same elements that you added in the first step.
falsarella
source share