jQuery - element inside popup editor

jQuery - element inside popup editor

  
When I try to do something like this:
$('#my-element').toggle();
via an expression inside a popup editor, the element is not found.

It seams that elements loaded on the ajax popup openning are not available on jquery context.

Why?