diff --git a/r2/r2/templates/ads.html b/r2/r2/templates/ads.html
index 26d33b49a..16a5cef03 100644
--- a/r2/r2/templates/ads.html
+++ b/r2/r2/templates/ads.html
@@ -35,7 +35,7 @@
tracker_url = tracking.get_impression_pixel_url("adblock")
%>
$(function() {
- var ad = $("#ad-frame");
+ var ad = $("#${thing.frame_id}");
if(!ad.length || ad.height() == 0 || ad.width() == 0 || ad.offset().left == 0) {
$(".footer").append("
");