Ich habe einige Codes von Jquery geschrieben, aber aus einem Grund kann es Jquery nicht finden. Ich habe $ zu Jquery geändert und bekomme immer noch den gleichen Fehler. Was ist, wenn ich das zum reinen JS ändere, irgendwelche Kommentare dazu?Kann Jquery nicht finden
var listener = throttle(300, function() {
slotsAtlantic.forEach(function (item) {
var $item = jQuery('#' + item.id);
if ($item.length) {
var $parent = $item.parent();
var index = slotsAtlantic.indexOf(item);
if ($parent.is(':visible') && ((window.scrollY || window.pageYOffset) >= ($parent.offset().top - jQuery(window).height() - 300))) {
googletag.cmd.push(function() {
googletag.pubads().refresh([item.slot]);
});
slotsAtlantic.splice(index, 1);
}
}
});
});
wo ist dein html? –
Haben Sie das jQuery-Skript-Tag in Ihrem HTML? – litel
http://www.w3schools.com/jquery/jquery_get_started.asp – DDan