When Adblock is active in chrome below script is not working in chrome. It shows error in console like this
jquery-1.7.2.min.js:4 GET http://example.com/advertisement/mult_select/30 net::ERR_BLOCKED_BY_CLIENT
jquery-1.7.2.min.js:4 POST http://example.com/advertisement/getCategoryFieldsList/30/0 net::ERR_BLOCKED_BY_CLIENT
I have tried also anti-adblock-killer.user.js. But still it is not working.
<script>
$(document).ready(function(event){
$('.category_1').live('change',function(){
var foo = [];
var name = [];
$('.category_1 :selected').each(function(i, selected){
foo[i] = $(selected).val();
name[i] = $(selected).attr("myTag");
});
//$('.category_title_0').html(name[0]);
var str = (foo[0]).replace(/\,/g, '');
$(this).parent('div').nextUntil('#tit').remove();
var str2 = $(this).find('option:selected').attr('parent_id');
$.ajax({
url: "<?= site_url('advertisement/mult_select')?>"+'/'+str,
success:function(result)
{
$('.mul-select').append(result);
}
});
$.ajax({
type: "POST",
dataType: 'script',
url: "<?= site_url('advertisement/getCategoryFieldsList') ?>"+"/"+str+"/"+str2,
success: function(result)
{
if($("#"+str2).length > 0)
{
$("#"+str2).empty();
$("#"+str2).nextAll('*').empty();
$("#"+str2).html( result );
}
else
{
$('#dynamic_fields_div').append( "<div id="+str2+"></div>" );
$("#"+str2).html( result );
}
}
});
});
});