Announcement

Collapse
No announcement yet.

How to user Retyped.packery ?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    How to user Retyped.packery ?

    Could anyone provide an example on how to use the Retype package named packery (https://packery.metafizzy.co/)?
    I have no clue on how to perform the following javascript:

    $('.grid').packery({
      // options
      itemSelector: '.grid-item',
      gutter: 10
    });
    I have tried something like this so far:
    var elem = Retyped.dom.document.getElementById(".grid");
    var pckry = new Packery(elem);
    But i am ending up with the following error
    Uncaught ReferenceError: require is not defined
    On this line
    require(["packery"], function (packery) {
    This is probably a newbie question. But i have seeked high and low for an answer so far.

    / UniChaos

    #2
    I looked at there github, it looks like there typescript is only up to version 1.4.1

    https://github.com/metafizzy/packery/issues/510

    maybe that is the reason.

    Comment

    Working...
    X