tags:

views:

18

answers:

1

Hello,

I have written code to overlay a SWF above a HTML button. I use the offset function from jQuery to get the coordinates and move the SWF. Unfortunately, it seems like the SWF do not get moved.

var offset = $("#button").offset();

$("#SWF").offset(offset);
$("#SWF").css({'left':offset.left, 'top': offset.top});
$("#SWF").offset({ top: 10, left: 30});

I have tried those 3 lines, and the offset never changed, I do not know why.

I hope someone could please help me.

EDIT:

I realized that:

$("#SWF").css({'left': offset.left, 'top': offset.top});

is working but actually I was using DOMWindow, I had to change the position and the z-index. I still have one issue, the SWF is not directly above the button, it's right underneath it. Does anyone know why please?

Thank you very much,

Rudy

A: 

Set wmode to "transparent" on the SWF, and make sure that the z-index of the SWF is higher than the z-index of the button.

Marko
Thanks, that was the issue.
Rudy