title: jQuery - Use a variable as a function parameter
body: <p>I want to use dynamic variable as a dynamic javascript function parameter. But it's giving error as variable not defined.</p>
  
  <pre><code>$.ajax({
      url: 'get_category_list.php',
      dataType: 'JSON',
      success: function (data) {
          var i = 1;
          $.each(data, function() {
              var id = this.id;
              //console.log(id);
              var edit = "&lt;img src='../../dist/img/icon/edit.png' " +
              "style='border: 1px solid #999637; " +
              "border-radius: 2px' " +
              "title='Edit' " +
              "onclick='show_edit_form(id)'&gt;";
              catTable.row.add([
                  i++,
                  this.name,
                  this.level,
                  this.create_date,
                  edit
              ] ).draw();
          });
      }
  });
  </code></pre>
  
  <p>Please tell me what is the exact problem here?</p>