jQuery - calling function with parameters inside method
<p>I'm wondering how is possible to call a function with parameters inside a method.
I have 2 functions and i'd like to call function deleteCode() when clicked on list element which is created by addCode() function.
I'm sure the solution is really simple, but i just can't see it right now. 
Many thanks!</p>

<pre><code>function addCode(code) {
    $('#codeList').append('&lt;li class="codeList" onClick="deleteCode(code);"&gt;' + code + '&lt;/li&gt;');
}

function deleteCode(code) {
    $('#'+code).remove();
}
</code></pre>
