First off: when I refer to String literals I am referring to the creation of string primitives, as shown below. There are two types of strings, primitives and objects. String objects are created like new String(..).
In javascript, string literals are created with quotation marks, or double quotation marks. This means you can define a string like
str = 'a string'
or
str = "a string"
Single Quotation mark
But say you define your string with a quotation mark, like the first example, and you put the word "can't" in it. Now the definition will look like below.
str = 'this can't work'
This will cause an error, because the actual string is considered to be 'this can'. If we want to use quotation marks in a string literal defined with quotation marks, we must escape those characters, with the escape character \ before them. (NOTE: this escape character isn't displayed in the final string, or even in it, as Felix points out in the comments, and is explained in more detail below)
To get the string to actually work and print 'this can't work', this means we would have to do something like this:
str = 'this can\'t not work'
Double Quotation mark
If we define your string with a double quotation mark, like the second example, we can put quotation marks in them without having to escape it, so the following works:
str = "this can't not work"
Now, say we wanted to put a quote into the string. We can use either single or double quotation marks. If we use double quotation marks in a string literal defined with double quotation marks, we will have to escape those characters like when we used single quotation marks in a string literal defined with a single quotation mark, like so:
str = "he said \"foo bar baz\""
If you define you string literal in a single quotation mark, you don't need to escape double quotation marks within that string, like so:
str = 'he said "foo bar baz"'
programmatically creating strings
Say we have a variable that can be true or false and we want to tell a user. to do this, we can create a string variable, and add the value straight into it, like so:
var someValue = true;
var str = 'hey some value is ' + someValue + '.'
You can add to the string as much as you want or like.
Original question
It seems like you want to embed some variable into your string list_options. To do this, try something like below:
list_options+='<li><input type="checkbox" value="Function 1 [1$]" name="html_options[]" class="check-opt" data="1">Function 1 <span>[1$]</span><p><a onmouseover="nhpup.popup(' + SOME_VARIABLE_YOU_WANT_TO_DISPLAY + ');" style="cursor:pointer;" > ? </a>!</p></li>';
If however, you don't want to embed a variable into the string, and want to just display fixed text, try either of the following:
This uses escaped characters:
list_options+='<li><input type="checkbox" value="Function 1 [1$]" name="html_options[]" class="check-opt" data="1">Function 1 <span>[1$]</span><p><a onmouseover="nhpup.popup(\' TEXT THAT SHOULD GET DISPLAYED \');" style="cursor:pointer;" > ? </a>!</p></li>';
This uses double quotation marks:
list_options+='<li><input type="checkbox" value="Function 1 [1$]" name="html_options[]" class="check-opt" data="1">Function 1 <span>[1$]</span><p><a onmouseover="nhpup.popup(" TEXT THAT SHOULD GET DISPLAYED ");" style="cursor:pointer;" > ? </a>!</p></li>';
Escaping Characters
So, escaping characters is something you will need to learn to use when defining your strings, as some characters in strings can break the string creation. Also, there are special characters which do things in a string which you may want, like a new line(use \n), or tab character(use \t). If you want to read more about these characters, just google 'javascript escape characters', or alternatively, MDN has great documentation here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
'My quote\'s quote'