whenInViewport icon indicating copy to clipboard operation
whenInViewport copied to clipboard

How to refire on orientation change / canvas rotate?

Open Creativenauts opened this issue 9 years ago • 0 comments

Hello there. I just started toying around with this plugin. Please bare with me as I am just getting into javascript. I notice that when I do canvas orientation change that many times the wheninview events do not fire.

I'm using this code from the example project which works perfect except when I rotate canvas on a mobile device.

;
$(function() {
    var WhenInViewport = window.WhenInViewport;

    $('.brick').whenInViewport(function($brick) {
        $brick.addClass('animate');
    });
});

Creativenauts avatar Mar 06 '17 18:03 Creativenauts