Stylegala Forums » Forums list » Javascript / DOM
moo.fx not working in IE
moo.fx not working in IE
| Author | Message |
|---|---|
Lost_User
|
Hi all,
Disclaimer: I'm no JavaScript programmer. I'm trying to use the moo.fx library to allow three divs on a page be toggled on and off, using the height toggle. I thought I was doing really well, getting the exact effect I was looking for in Firefox. Then I opened IE and in all went pear shaped. Here is the JS I have in my header:
<script type="text/javascript" src="scripts/prototype.lite.js"></script>
And here is the html on the page:
<a href="#" onclick="myHeight.toggle();">toggle Height</a>
In Firefox the page loads with the divs hidden and then each one will show / hide by clicking the corresponding link (what I'm after.) In IE the page loads with the divs shown and if you click any link the corresponding div slides to hidden and then immediately shows itself again. Update: actually in IE only the first link has any effect, the second and third link don't do anything at all. Why would it work in Firefox but not in IE? Any thoughts? Thanks in advance |
| Sponsor | |
Lost_User
|
I have been fighting with the same issue for the past two days. It's only in IE (version 6 is what I'm testing on).
I'm going to keep trying and will post back if I can come up with a solution. Some suggestions of setting the height property to 0 in the css worked in FireFox but did not hide the element in IE. Setting it to 1 basically hid it but then threw off the toggle method. |
Lost_User
|
Hi Senza,
Glad to know it's not just me! I've now had a colleague of mine write their own JS for me. It's not as slick as the moo.fx effects, but it hides and shows the bits I need. Good luck with your testing. |
Lost_User
|
In the header instead of
myHeight.hide();
Try this
myHeight.toggle('height');
The code in the onClick should be the same as above. Disclaimer: I too am no JavaScript programmer. Disclaimer2: I'm doing this from memory. Disclaimer3: My memory isn't good. |
Lost_User
|
@dblake_md
Thanks for the suggestion. It turns out that the problem wasn't in the code. It's in the fact that I'm a moron. I didn't have a doctype. @cheezepie The problem was likely due to a missing doctype.
|
Page 1 of 1
Powered by phpBB. © 2001, 2006 phpBB Group & Logo Design
Post new topic
Reply to topic