jQuery class: append html with a call to a function in the class
<p>Greetings fellow stackoverflowers,</p>

<p>I'm working on a jQuery class where I have a function that appends some html code to a container.</p>

<pre><code>this.displayOptions = function(property, container) {
    for (var i = 0; i &lt; this[property + 'Count']; i++) {
        $(container).append('&lt;a href="#" onclick="' + call_a_function_from_this_class + '; return false"&gt;&lt;/a&gt;');
    }
}
</code></pre>

<p>So far, no problem.
In this same class I have another function</p>

<pre><code>this.setProperty = function(property, index) {
    this[property] = index;
    this.update();
}
</code></pre>

<p>I want the appended HTML to call this function  <code>setProperty</code> function when I click on it.
How can I do this?</p>

<p>For what's it worth, I initialize my class like this</p>

<pre><code> var myVariable = new MyPlugin();
</code></pre>

<p>I know I could do <code>&lt;a href="#" onclick="myVariable.setProperty('', '')"&gt;</code> but the plugin can't know the variable.</p>

<p>Any help is appreciated!</p>
