I assume, that this
refers to some jQuery Object. You could create the respective objects using the jQuery function and then use bind()
to attach the object as this
to your actual function:
// prepare the DOM objects
var $elem = $( '...' );
// prepare a bound function
var boundFct = updateElement.bind( $elem );
// execute your function
boundFct();