I attempted to create a code that would position an SWF file on top of an HTML button using jQuery's offset function to determine the coordinates. However, despite my efforts, the SWF does not appear to move as intended.
var offset = $("#button").offset();
$("#SWF").offset(offset);
$("#SWF").css({'left':offset.left, 'top': offset.top});
$("#SWF").offset({ top: 10, left: 30});
After trying out these lines of code, I noticed that the offset remained unchanged, and I am unsure why.
If anyone could provide some assistance, I would greatly appreciate it.
UPDATE:
I later discovered that:
$("#SWF").css({'left': offset.left, 'top': offset.top});
successfully worked. However, since I was utilizing DOMWindow, I needed to adjust the position and z-index values. There is still one issue lingering; the SWF appears directly under the button instead of on top of it. Any insights into this matter would be extremely helpful.
Thank you for your help,
Rudy