jQuery resize and ready


#1

Hello everybody,

what’s the best way to implement jQuery resize and document ready events?

  1. Resize: the best suggested approach is this, but if I simply use

    $(window).resize(function(){
    logic();
    });

it seems to work fine. What’s the catch?

  1. Ready: They suggest to use client side Meteor.startup(); but what if I want to implement template specific ready events?

#2

Also Meteor.body.onRendered doesn’t work if you load body tags yourself. Is there any alternative to call functions on document ready for all templates?


#3

Never had a problem with $(window).resize(). You might also be interested in this package.


#4

me neither, but then I’m not sure I understand the difference with the github example.

Thank you for the link, I’m trying to gather all template packages to make the best use of them, maybe create a package to rule them all :stuck_out_tongue: