nckprsn / scrollme

A jQuery plugin for adding simple scrolling effects to web pages.
1.47k stars 318 forks source link

using filter() instead of find() #6

Closed juanbrujo closed 10 years ago

juanbrujo commented 10 years ago

using filter() instead of find() allows to reference the element itself and use it as .scrollme & .animateme

nckprsn commented 10 years ago

Unfortunately this would break ScrollMe if the .scrollme & .animateme aren't the same element as filter() would return an empty set.

That said, I see what you're getting at. This should to do the trick:

$( this ).find( '.animateme' ).addBack( '.animateme' ).each( function()
{
    (...)
});

I'll include it in the next release.

Thanks!