So i use this code in a template.php of WordPress:
<script type="text/javascript">
jQuery(document).ready(function($){
console.log('A');
$('div.banner_gebraucht').each(function(){
console.log('B');
if( $.trim($(this).text()) == '') {
console.log('step info')
$(this).hide();
$('.banner3dtriangle_gebraucht').hide();
console.log('D');
}
});
});
</script>
In Console it works, but in the template.php it only outputs A. Can you guys tell me, why this script stops?