Giter Club home page Giter Club logo

stellar.js's Introduction

stellar.js


https://github.com/markdalgleish/stellar.js

$(window).stellar();
$('#main').steller();

$.stellar();

$.steller({
  horizontalOffset: 40,
  verticalOffset: 150
});

$('#gallery').steller({
  scrollProperty: 'transform'
});

$('#gallery').stellar({
  positionProperty: 'transform'
});

$.stellar({
  horizontalScrolling: true,
  verticalScrolling: true,
  horizontalOffset: 0,
  verticalOffsetL 0,
  responsive: false,
  scrollProperty: 'scroll',
  positionProperty: 'position',
  parallexBackgrounds: true,
  parallexElements: true,
  hideDistantElements: true,
  hideElement: function($elem) { $elem.hide(); },
  showElement: function($elem) { $elem.show(); }
});

$.stellar.scrollProperty.margin = {
  getLeft: function($element){
    return parseInt($element.css('margin-left'), 10) * -1;
  },
  getTop: function($element){
    return parseInt($element.css('margin-top'), 10) * -1;
  }
}

$.stellar({
  scrollProperty: 'margin'
});

$.stellar.positionProperty.position = {
  setTop: function($element, newTop, originalTop){
    $element.css('top', newTop);
  },
  setLeft: function($element, newLeft, originalLeft){
    $element.css('left', newLeft);
  }
}

$.stellar({
  positionProperty: 'position'
});

$.stellar.positionProperty.foobar = {
  setPotision: function($element, newLeft, originalLeft, newTop, originalTop){
    (newleft - originalLeft) + 'ps, ' +
    (newTop - originalTop) + 'px, ' +
    '0)');
  }
}
$.stellar({
  positionProperty: 'foobar'
});
<djv data-stellar-ratio="2">

<div data-teller-background-ratio="0.5">

<div data-stellar-ratio="2"
     data-steller-horizontal-offset="40"
     data-steller-vertical-offset="150"
>

<div data-steller-offset-parent="true">
<div data-steller-offset-parent="true"
     data-steller-horizontal-offset="40"
     data-steller-vertical-offset="150">
bower install jquery.stellar  

npm install
grunt
grunt test
grunt lint
grunt watch

stellar.js's People

Contributors

takagotch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.