Pass params into position()?
Hi All,
I'm trying to write a generic positioning function so that I can pass in various jquery objects and position them... The only things that will change are the object passed in and the offsets. Passing in the object works fine, but I can't seem to get the syntax for the offset to work. Can anyone tell me what I'm doing wrong?
- function doPosition(object, offsetX, offsetY){
- j(object).position({
- of: j('#stage'),
- my: 'left top',
- at: 'left top',
- offset: "'"+offsetX+' '+offsetY"'";
- });
- }
-
- doPosition(j('#myView'),50,60);
Many thanks for any help,
brokenindex