Relocate status element

Relocate status element

I am trying to integrate the following file upload plugin http://valums.com/ajax-upload/

It creates a file status update directly below the file upload button, but I wish the update bar to be located elsewhere.  The plugin's JavaScript is a little too complex for me to change directly where the status update is displayed.

The plugin does have an onSubmit method, and my plan is to just relocate the status update. The plugin shows the status update in a UL with class=qq-upload-list.  I added a empty div element with id=newPosition.

The following works, but I am curious if there is a much better way to do this.

Thanks

  1. onSubmit: function(id, fileName){
  2.  var p = $("#newPosition").position();
  3.  $(".qq-upload-list").newPosition(p.left,p.top);
  4. },
  5. .....
  6. jQuery.fn.newPosition = function (x,y) {
  7.     this.css("position","absolute");
  8.     this.css("top", y + "px");
  9.     this.css("left", x + "px");
  10.     return this;
  11. }