GithubHelp home page GithubHelp logo

madrobby / emile Goto Github PK

View Code? Open in Web Editor NEW
529.0 529.0 60.0 153 KB

emile.js is a no-frills stand-alone CSS animation JavaScript framework, named after Émile Cohl, early animator.

Home Page: http://twitter.com/emilejs

License: MIT License

JavaScript 100.00%

emile's People

Contributors

brianleroux avatar fearphage avatar madrobby avatar manfred avatar randometc avatar trodrigues avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emile's Issues

'z-index' is not working

Hi,

I appriciate this emil.

I have tried to set z-index, but it shows css error.
Am I doing wrong or ?

emile('test2', 'left:300px;z-index:4;padding:10px;border:50px solid #ff0000', {
duration: 500,
after: function(){
emile('test1', 'background:#0f0;left:100px;padding-bottom:100px;opacity:1', {
duration: 4000, easing: bounce
});
}
});

letter-spacing doesn't work.

This breaks and eventually crashes the browser:

<h1 id="header">Hello, World!</h1>
<script type="text/javascript" charset="utf-8">
  emile('header', 'letter-spacing: -19px');
</script>

emile('test', 'opacity: 0'); // doesn't work

sort of a major use-case for animation. this basically doesn't work in <= IE8
i tried taking a stab at this in a branch, but having a hard time parsing out what some of this code means.

color function fails in IE7

IE7 chokes on
v.push(parseInt(c.substr(1+j_2,2), 16))
in the *color_ function as c is not defined when processing colors like “#ffff99″.

Changing this to
v.push(parseInt(arguments[i].substr(1+j*2,2), 16))
looks to resolve this issue.

stoping animation

please add

return interval;

to the

container[emile] = function(){ .. }

for use as

var anim = emile('card', 'left:-320px', {duration: 2000});  // from example
clearInterval(anim);  // when need to stop

opts.after callback function called twice

I'm using FF 3.5.7. I'm not sure if this bug is unique to my browser/setup or not.

To reproduce:
emile( el, 'margin-top:120px;', {duration:150, after:function() { console.log('here'); }} );

"here" is printed twice.

Also, one more unrelated thing: options.after would be significantly more useful if you made one small change to emile.js:

Change line 48 from:
if(time>finish) { clearInterval(interval); opts.after && opts.after(); }

To:
if(time>finish) { clearInterval(interval); opts.after && opts.after.call(el, opts); }

This will make "this" refer to the element being animated in the callback and also provide the options as an argument.

ex:
emile( el, 'margin-top:120px;', {duration:150, after:function() { this.className='justanimated'; }} );

Love emile! Great job!

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.