define(['jquery', 'underscore', 'backbone','text!controls/footer/footerTemplate.html'], function($, _, Backbone, footerTemplate){ var footer = Backbone.View.extend({ //initialize template template:_.template(footerTemplate), //render the content into div of view render: function(){ this.$el.attr('data-role', 'footer'); this.$el.attr('data-position', 'fixed'); this.$el.attr('class', 'nav-glyphish-example'); this.$el.attr('data-tap-toggle', 'false'); //this.el is the root element of Backbone.View. By default, it is a div. //$el is cached jQuery object for the view's element. //append the compiled template into view div container this.$el.append(this.template()); //return to enable chained calls return this; } }); return footer; });