Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmplItem.update() should return a jQuery object #55

Open
yangjh opened this issue Jan 26, 2011 · 7 comments
Open

tmplItem.update() should return a jQuery object #55

yangjh opened this issue Jan 26, 2011 · 7 comments

Comments

@yangjh
Copy link

yangjh commented Jan 26, 2011

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;
}

}

@Gedis
Copy link

Gedis commented Feb 1, 2011

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

@Gedis
Copy link

Gedis commented Mar 1, 2011

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$;
}

@BorisMoore
Copy link
Owner

Thanks, we will look into this for Beta2.

@aaronshaf
Copy link

+1 vote

@flosse
Copy link

flosse commented Jul 8, 2011

+1

@aaronshaf
Copy link

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

@rdworth
Copy link
Contributor

rdworth commented Oct 8, 2011

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants