Sunday 15 May 2011

Is it possible to use jQuery one() to insert content? -



Is it possible to use jQuery one() to insert content? -

is possible utilize jquery's one() insert content element once? e.g $(".mainbanner").one("insertbefore or insert or append or prepend", function(){//the content});

i havent had thorough mess around 1 function , assume should straight forward, have of guys had utilize more complicated click?

is possible utilize jquery's one() insert content element once?

no. why want to? have each method's functionality invoked once, calll once:

$(".mainbanner").insertbefore('some stuff');

have of guys had utilize more complicated click?

if 'more complicated' mean illustration (insertbefore, insert, append, prepend), no, because not events. (not sure where got insert from, isn't method...)

.one() calling event handler function once. after event triggered once, event handler removed.

what talking dom manipulation. can't phone call dom manipulation methods in conjunction .one(), doesn't create sense.

unless talking manipulating dom within event handler function:

$(".mainbanner").one('event name', function(){ $(this).insertbefore('...'); });

jquery

No comments:

Post a Comment