views:

1080

answers:

3

Hi all,

I have a sIFR replaced H2 link that simply toggles (w/ jQuery) another div on and off. 'Seems' to work in all browsers but Firefox 3. Any thoughts ?

<ul id="titlenav">
   <li><h2><a href="javascript:void()">Title</a></h2>
    <ul id="titlemenu">
       <li>1</li>
       <li>2</li>
       <li>3</li>
    </ul>
   </li>
</ul>


$('#titlenav h2').click(function() {
  $('#titlemenu').Toggle();
});

My siFr replace config and css is ultra simple and sIFr links generally work, just not jquery functions. Im using ; - jquery-1.3.1 - sIFR 3 R 427

Any advice welcomed. I'm pretty new to all this.

A: 

What OS are you using? I've heard there are problems getting sFIR to run correctly with alpha transparency on linux systems; it could be the cause.

If you're still having problems with this an alternative may be typeface.js which is all js, no flash.

digitala
Doesn't work on Windows (XP) or Mac OSX (Leopard). I'm not using transperency either. Thanks.
A: 

Hmm, I've never heard about this sIFR thingy before. Looks cool, though, that is, when I can get it to work. Apparently, most of the sIFR demos I found fail to work with FF3 on Ubuntu Linux. Finally, I found one which works, and also offers jQuery integration: http://dev.jquery.com/~gilles/sifr/, you might want to check it out.

David Hanak
Thanks, I'm thinking of looking into that (or one like it), though, I I've gotten this far with sIFR and all I need is for it to trigger jquery. Doesn't seem I'm that far away. Maybe.
A: 

The problem is that the click event on the Flash doesn't propagate to the h2 element. Check out the onRelease callback, which you can specify as an argument to sIFR.replace. It's fired whenever you click on a replaced Flash movie.

Mark Wubben
Many thanks, works great.