This question already has answers here:
</div>
</div>
<div class="grid--cell mb0 mt4">
<a href="/questions/203198/event-binding-on-dynamically-created-elements" dir="ltr">Event binding on dynamically created elements?</a>
<span class="question-originals-answer-count">
(23 answers)
</span>
</div>
<div class="grid--cell mb0 mt8">Closed <span title="2015-11-19 00:16:24Z" class="relativetime">4 years ago</span>.</div>
</div>
</aside>
I create a link in ajax callback function and define a class for that, commands that I write on click of this link doesn't work. the code is here:
$('.catpics').click(function(){
var id=$(this).attr('id');
$.post('storehouse.php', {
catid:id,
btn:'showsub'
},function(data){
$('#subcatshelf').append('<a class="catpics" id="'+ data+'">'+data+'</a>');
});
</div>