The problem is that I do not know how to call in jquery selectors that are inside a div in jquery, I need it because in my code to the functions well but when assigning a container to the divs that are called by the query no longer It does all the function of events like removing
<div id="campoBusq"></div>
<div id="cont-categoria" class="centFRH">
<div id="categoria">';
include("selectCategJquery.php");
</div>
</div>
<script>
jQuery(document).ready(function() {
$('#categoria').on('click','.elemento',function() {
var e = $(this).clone();
var identificador = $(this).attr("iden");
if($("#campoBusq").find("."+identificador).length){
}else{
$(e).appendTo('#campoBusq');
}
});
$('#campoBusq').on('click','.elemento',function() {
$(this).remove();
});
});
</script>
This is the view
* When I click; he must show in the div that he works as an imput and when he clicks on the content that was added; it is removed but the detail is that before I clicked on the elements of the fieldBusq and the category and removed from where it was assigned that fieldBusq but the one that does not work is categorized since I click and no longer remove this step after assigning new divs as a container *