jqGrid is not a function

jqGrid is not a function

Hello all !

So I'm using jqGrid to show some data and it works all ok until I use another function. When I call the jqGrid function again,firebug shows me the "jqGrid is not a function " error and shows the line that the "caption" attribute is.

The other function is called via grails built-in ajax function (link-remote) that, when someone click's it, calls the server-side and collect some data.

Here's my jqgrid function:

function showOperationTypeContent(){
    str = $("#content").html();
    $("#content").html("<br /><table id=\"list2\"></table> <div id=\"pager2\"></div>")
    alert(str)
    jQuery("#list2").jqGrid({
        datatype: 'jsonstring',
        datastr : str,
        jsonReader : {
            repeatitems: false,
              id: "0"
           },
        colNames:['Nome','Média de Tempo'],
        colModel:[ {name:'name',index:'name', width:200},
                   {name:'mean',index:'mean', width:200},
                   ],
        rowNum:10, rowList:[10,20,30],
        pager: '#pager2',
        sortname: 'name',
        viewrecords: true,
        sortorder: "desc",
        caption:"Operações"
        });
    jQuery("#list2").jqGrid('navGrid','#pager2',{edit:false,add:false,del:false});
}

My other function (that are called via the other link):
$("#sel").change(function(){
    $("#forms > *").hide()
    opt = $("#sel option:selected").val()
    if(opt != ""){
        $("#" + opt).show()
    }
}).trigger('change')

The way that I call the server side:

<li><g:remoteLink controller="operationType" action="show" onComplete="showOperationTypeContent()" update="content">Listar Opera&ccedil;&otilde;es</g:remoteLink></li>
<li><g:remoteLink controller="operationType" action="create" update="content">Criar Opera&ccedil;&atilde;o</g:remoteLink></li>

Any hint would be appreciated. :D