How do i pass an value to a function that i use as parameter?
<p>i want to pass a function as an parameter if an element was clicked.
But in the function that i pass i want to set an attribute information from the clicked element.</p>

<p>What is the best way to pass the attribute value to the inner of the function?</p>

<p>My JavaScript looks like this:</p>

<pre><code>$('.edit-link').livequery(function(){
    $('.edit-link').click(function(){
        WMT.openOverlay($('#edit'),{
            relativeTo: $('.search'),
            width: $('.search'),
            close: $('#cancel_edit'),
            fillFields: function(){
                return $.getJSON("ajax/edit.php?id=" + $(clickedElement).data('id'));
            }
        });
    });
});
</code></pre>

<p>i want to send the data attribute "id" in the json.</p>
