I would like to loop through all elements of type “.dxpc-content img” if it contains a chart… I then want to call the PerformCallback method on the chart by retrieving it’s attribute “id” with the following:
I am trying this like so:
$('.dxpc-content img').each(
function () {
if ($(this).attr("id").attr("id")) {
alert("contains chart");
if ($(this) && $(this).attr('id').attr('id') && window[$(this).attr('id').attr('id')].PerformCallback) {
window[$(this).attr('id').attr('id')].PerformCallback("stat" + "," + brokerStats);
}
}
}
If I inspect the element in Chrome dev tools it looks like this:

You have chart with
ids starting with barChart… which could be seen in image attached so you need to find the elementshaving ids containing barChart,