Hirdetés

Keresés

Új hozzászólás Aktív témák

  • Sk8erPeter
    nagyúr

    Hat, szerintem meg nem igy kell hasznalni ahogy o probalta. En nem ismerem ezt a libet, es epphogycsak megnyitottam a github repot, de szerintem ez nem egy jQuery widget, hanem egy kulon fajl egy konstruktorral.

    http://imakewebthings.com/waypoints/guides/getting-started/

    var waypoint = new Waypoint({
    element: document.getElementById('element-waypoint'),
    handler: function(direction) {
    notify(this.element.id + ' triggers at ' + this.triggerPoint)
    },
    offset: '75%'
    })

    Pedig csak a következő menüpontra kellett volna kattintanod. :P :))
    http://imakewebthings.com/waypoints/guides/jquery-zepto/

    "Prior to version 3.0, Waypoints was strictly a jQuery plugin. You'll notice most of the examples on this site use code that is compatible with the new no-framework build of Waypoints using class instantiation and generally available DOM querying methods, like this:
    var waypoint = new Waypoint({
    element: document.getElementById('new-operator'),
    handler: function(direction) {
    notify(this.id + ' hit')
    }
    })

    If you're using the jQuery or Zepto builds, you can still use the no-framework approaches featured in the documentation, but those builds also provide extensions specific to the framework."

    Aztán egy példa:
    var waypoints = $('#options-only').waypoint({
    handler: function(direction) {
    notify(this.element.id + ' hit')
    }
    })

    wis itt korábban már linkelt egy működőt. :)
    Tehát az van, amit mondott, hogy csak simán rossz fájlt használ, vagy rossz az elérési út.

Új hozzászólás Aktív témák