javascript - Backbone adding content to current view -


i'm not familiar backbone have project support has tiny usages of backbone. there spot in backbone script of page:

app.views.products = backbone.view.extend({              tagname: "table",              classname : "table table-bordered table-hover data-table",  }); 

which initializes view-template , parse table , renders view. want add before table, have added following piece above code not work, , adds content beginning of table:

initialize : function(){    this.$el.prepend("i have added content,"); } 

.prepend() method inserts specified content first child of matched element(s).

in case have use .before method instead:

initialize : function(){    this.$el.before("i have added content,"); } 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -