jquery calling function from document ready
<p>I see a bunch of similar questions, but didn't find the answer I need .  I have this function:</p>

<pre><code>function fnGetContent(keyword) {
    var NewKeyword = keyword.tag;
    var type = keyword.type;
    $.ajax({
        type: "POST",  //GetEvents(iType As Integer, sSearch As String)
        url: "Default.aspx/GetEvents",
        data: "{'iType':'"+ type +"','sSearch' : '" + NewKeyword + "'}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (msg) {
            var res = unescape(msg.d);
            $("#divResults").html(res);
            $('.accordian_body').hide();
            $('.accordian_head').click(function () {
                $(this).next().animate(
                    { 'height': 'toggle' }, 'fast'
                );
                $('.plus', this).toggleClass('subtract');
                $('#&lt;%= tSearch.ClientID %&gt;').val() = 'Search by event, team, artist or venue';
            });       
        }
    });
    return false;
}
</code></pre>

<p>It works fine being called from here:</p>

<pre><code>&lt;a href="javascript:void(0)" onclick="fnGetContent({'type' : '2', 'tag' : 'concert'});"&gt;TEST TAG&lt;/a&gt;
</code></pre>

<p>But I also want to call this function on my <code>Document.Ready</code> , I want it to run right when the page is loaded , then I will call it every time I want the results to be updated through <code>&lt;a href&gt;</code>  .  THis does not work , other answers to similar questions were to not call a function defined out side of ready, I know it is possible to call the same function from multiple spots including Document.Ready</p>

<pre><code>$(document).ready(function () {
    function fnGetContent("{'type' : '2' , 'tag' : ' ' }");
});
</code></pre>
