Hi Kevin,

Thanks a lot for your suggestion.

If you say that it would improve performance, I can try this way of
inserting missing elements with a single 'append'.

Also, do not hesitate if you have any other recommendation or comment.


-Laurent



On Jan 17, 11:58 am, Kevin Dalman <kevin.dal...@gmail.com> wrote:
> Interesting plug-in. I do a lot of DOM manipulation so am always
> interested in new ideas. I am particularly interested in optimizing
> the speed of generating and appending new elements.
>
> I had a quick peak at the source code and it appears each element is
> appended to the DOM one-by-one. Would it not provide better
> performance if ALL missing, and by definition 'nested', elements were
> created and then added to the DOM with a single 'append'?
>
> This is not the best place to discuss this, but I didn't want to take
> the time to create an account to add it to Git-Hub.
>
> /Kevin
>
> On Jan 15, 10:39 am, lfortin <laurent.for...@gmail.com> wrote:
>
>
>
> > Hi all,
>
> > I have recently released a beta version of my new plugin, the Drive
> > jQuery plugin.
>
> > This plugin is a new kind of DOM builder: it allows you to construct
> > the DOM using basic jQuery selectors.
> > It searches for elements, and if none is found, it attempts to create
> > them.
>
> > For example, assuming a default element tag = 'div':
>
> > $('#element1 > #element2.class1 > span#element3.class2 > img').drive
> > ( );
>
> > is the equivalent of:
>
> > $('#element1').append(
> >     $('<div id="element2" />')
> >         .addClass('class1')
> >             .append(
> >                 $('<span id="element3" />')
> >                     .addClass('class2')
> >                         .append($('<img />'))
> >             )
> > );
>
> > I need people to try and test my plugin :-)
>
> > If you are interested, here is the repository on 
> > Github:http://github.com/lfortin/drive-jquery-plugin
>
> > Downloads page:http://github.com/lfortin/drive-jquery-plugin/downloads
>
> > Documentation:http://wiki.github.com/lfortin/drive-jquery-plugin/
>
> > If you encounter any bug or weird behavior, or if you have any
> > comment, please reply to this post!
>
> > Thank you for your help in advance,
>
> > -Laurent

Reply via email to