|
storyTemplate: _.template( $('#story-item-template').html() ), |
see this post for a good explanation of how to use underscore templating: https://www.bennadel.com/blog/2411-using-underscore-js-templates-to-render-html-partials.htm
also, use the passed in $template when we instantiated the new module. that's why we pass it in. so instead of $('#story-item-template').html() here you will use the pre-cached this.$template.html() - or even better, when assigning $template to this.$template go ahead and grab the html() then on line 10, then your call would just be this.$template
makezine/wp-content/themes/makeblog/js/footer-scripts/modulePattern_iScroll.js
Line 54 in 841cf26
see this post for a good explanation of how to use underscore templating: https://www.bennadel.com/blog/2411-using-underscore-js-templates-to-render-html-partials.htm
also, use the passed in
$templatewhen we instantiated thenewmodule. that's why we pass it in. so instead of$('#story-item-template').html()here you will use the pre-cachedthis.$template.html()- or even better, when assigning$templatetothis.$templatego ahead and grab thehtml()then on line 10, then your call would just bethis.$template