jquery-tmpl icon indicating copy to clipboard operation
jquery-tmpl copied to clipboard

tmplItem.update() should return a jQuery object

Open yangjh opened this issue 14 years ago • 7 comments

As .tmpl(data) return a jQuery object, that we can continue do some post processing, for example event binding, the tmplItem.update() method should follow the same pattern, so that the newly updated jQuery object should be also returned.

function tiUpdate() {
    var coll = this.nodes;
    var tmpl = jQuery.tmpl( null, null, null, this).insertBefore( coll[0] );
    jQuery( coll ).remove();
    return tmpl;
}

}

yangjh avatar Jan 26 '11 03:01 yangjh

+1 vote for this feature - after update nodes attributes becomes empty

Gedis avatar Feb 01 '11 13:02 Gedis

quick unofficial fix :)

function tiUpdate() { var coll = this.nodes; var _renderedContent$ = jQuery.tmpl( null, null, null, this).insertBefore( coll[0] ); jQuery( coll ).remove(); return _renderedContent$; }

Gedis avatar Mar 01 '11 13:03 Gedis

Thanks, we will look into this for Beta2.

BorisMoore avatar Mar 01 '11 18:03 BorisMoore

+1 vote

aaronshaf avatar May 05 '11 23:05 aaronshaf

+1

flosse avatar Jul 08 '11 15:07 flosse

+1... er... already did that :)

aaronshaf avatar Jul 09 '11 00:07 aaronshaf

Thanks for taking the time to submit this issue. Just wanted to let you know this plugin is no longer being actively developed or maintained by the jQuery team. See README for more info.

rdworth avatar Oct 08 '11 06:10 rdworth