From f05cdc80a2ad2e38c1e3399d1fe6a7529b542dbc Mon Sep 17 00:00:00 2001 From: iamalexkempton Date: Tue, 25 Mar 2014 16:32:33 +0000 Subject: [PATCH] Change 'document' to 'window' in code example The current code example of binding a resize event to 'document' does not actually work. Binding the event to 'window' does. :) --- doc/pages/javascript-utilities.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/pages/javascript-utilities.html b/doc/pages/javascript-utilities.html index bd18d71a2..211d8ad00 100644 --- a/doc/pages/javascript-utilities.html +++ b/doc/pages/javascript-utilities.html @@ -127,7 +127,7 @@ $('.button').on('click', function(e){ }); // Resize function -$(document).on('resize', function(e){ +$(window).on('resize', function(e){ // Do responsive stuff }); ``` @@ -143,7 +143,7 @@ $('.button').on('click', Foundation.utils.debounce(function(e){ }, 300, true)); // Throttled resize function -$(document).on('resize', Foundation.utils.throttle(function(e){ +$(window).on('resize', Foundation.utils.throttle(function(e){ // Do responsive stuff }, 300)); ``` -- 2.47.2