Rich-Harris / ramjet

Morph DOM elements from one state to another with smooth animations and transitions

Home Page:http://www.rich-harris.co.uk/ramjet/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Jquery Selectors

MrAlexLau opened this issue · comments

Would be convenient to say:

ramjet.transform( $('#a'), $('#b') );

instead of currently having to verbosely convert jquery elements to their corresponding dom elements:

ramjet.transform( $('#a').get(0), $('#b').get(0) );

I do love using jQuery but I don't think this is a good idea. Why instead you create a jQuery plugin for using ramjet in that context ? Something like:

$('#a').ramjetTransform({to: $('#b')});

@sithmel - yes I like your idea better. What I originally proposed could easily become a leaky abstraction.