Kind of hard to explain, I'm using the .after() jquery function to place html in a div container, then in one of the tags there is an onclick attribute to call a function which passes in a string (javascript variable), but this variable needs to be surrounded in quotes for the javascript function to work:

Note, the after function seems to replace single quotes with double quotes for the html attributes?

```
$("#outputsContainer tr:last").after(
    "<tr>\
       <td>"+value.name+"</td>\
       <td>"+value.status+"</td>\
       <td>\
          <a href='" + value.delete + "' onclick='" + myfunction(value.status) + "'>Delete</a>\
          <a href='" + value.download + "'>Download</a>\
       </td>\
    </tr>");

```

I've managed to get the variable value within the function, but cannot seem to place quotes around it easily

Output:

```
<a href="/item/4/download" onclick="myfunction(complete)">Download</a>

```

What I'm after (Notice the quotes around complete):

```
<a href="/item/4/download" onclick="myfunction('complete')">Download</a>

```

Help appreciated, thanks!