Skip to content

Instantly share code, notes, and snippets.

@stephentcannon
Created February 13, 2014 20:14
Show Gist options
  • Save stephentcannon/8982937 to your computer and use it in GitHub Desktop.
Save stephentcannon/8982937 to your computer and use it in GitHub Desktop.
Session.set("resize", null);
Meteor.startup(function () {
$(window).resize(function(evt) {
Session.set("resize", new Date());
});
});
Template.homePage.resized = function(){
var width = $(window).width();
var height = $(window).height();
doSomethingCool(width, height);
return Session.get('resize');
};
<template name="homePage">
<div class="panel">
random content...
<div>
<div class=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment