Task 2.b passing text as input to template()


project link: https://www.codecademy.com/en/courses/jquery-ext/projects/jquery-prj_listeasy?link_content_target=interstitial_project

I can not figure out how to add new list items. I think the problem lies with my var html = $('text').template(); but I'm not sure.

var template = function(text) {
  return '<p><input type="checkbox"><i class="glyphicon glyphicon-star"></i><span>' + text + '</span><i class="glyphicon glyphicon-remove"></i></p>';

var main = function() {
  $('form').submit(function() {
    var text = $('#todo').val();
    var html = $('text').template();
    return false;  



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.