I am quite new to javascript and jquery so this might be a really simple problem. Please don't mind.
I am appending new link(a) elements in division with id = "whatever" by
$("#whatever").append(jQuery('<a>').attr('href', 'url').text('blah'));
And calling a function
$(function () {
$('#whatever a').tagcloud();
});
on every link element inside that particular div. But this function is being called only on old elements and not on the ones that I just dynamically added. I tried doing this:
$(document).on("change", '#whatever', function () {
$("whatever a").tagcloud();
});
But its still not working.