I'm struggling with a complex nested quotes statement here :

```
var name = "foo";
$("#list").append("<li data-theme='c'><a href='#details' onclick='sessionStorage.name=PRINT_VAR_NAME_HERE;' data-transition='slide'>PRINT_VAR_NAME_HERE</a></li>");

```

I am able to print the variable's value fine in the **second** position by using : "+name+"

But not sure how to get it done in the **first** position.

(I have used 'PRINT\_VAR\_NAME\_HERE' as a placeholder for the first and second positions)

Any ideas ? Thanks.