How can I make a function act like a callback
<p>How can I make <code>shwOpts.show("fast");</code> to act when <code>removeHighlight()</code> is done?</p>

<p>I thought if I put an anonymous function as an argument in the other it will act as a callback. This didn't work.</p>

<pre><code>removeHighlight : function(f) {
        // remove previous highlight.
        var highlight = $('#openid_highlight');
        if (highlight) {
            highlight.replaceWith($('#openid_highlight a')[0]);
        }
    },


 moreOptsLink = $("#more-options-link").click(function () {
              moreOptsLink.detach();
              openid.removeHighlight(function(){$("#show-more-options").show("fast");});
              //shwOpts.show("fast");
              openid.setPref("showMoreOpenIdOptions", !0)
            });
</code></pre>
