View Full Version : cross-browser sliding div's
08-17-2004, 10:14 AM
thanks to cross-browser.com i've borrowed some code and produced:
BUT here comes the next part...
The link above works fine if you put the mouse over the appropriate div. What i would like to do instead is have the new div slide down upon clicking of the link rather than just mouse over. any ideas??
What i would like to do is have the new div slide down upon clicking of the link rather than just mouse over.
that's a nice effect.
if you change the event to onclick as opposed to onmouseover, won't that do wot you want? also, don't use JS URLs, since it's not accessible and prevents you from using a viable alternative, ie a genuine link for non-JS browsers.
08-17-2004, 04:51 PM
if only it were that simple!
http://cross-browser.com/x/examples/slideouts.html was the original code that i downloaded and modified (http://cross-browser.com/toys/ for script download if you're interested)
08-18-2004, 06:46 PM
I'm glad you like my toys, and I really like how you're using them on your page :-)
A few comments...
1) I've been removing the use of xInclude() from the demos. Obviously I missed the slideOut demo ;-). xInclude() was a fun little experiment, but it's overkill and causes more problems than it solves. I've now updated the slideOut demo to not use it.
2) I have another demo (just recently completed) which may be more appropriate for your application. Check out the xSlideMenu1 (http://cross-browser.com/x/menus/xmenu1.php) demo.
08-18-2004, 11:05 PM
I'm glad you like my toys, and I really like how you're using them on your page
I've used that new menu script to produce:
Still a slight problem with it though - whenever the user clicks to activate a link, if the previous one is still open the new one tumbles down without closing the original one, but i'll think up something for that i'm sure.
Also, in firefox it works ok wherever you click, but in IE it works if you click the anywhere in the div EXCEPT over the text. weird....
08-19-2004, 05:28 PM
I worked a little more on the xMenu1 Demo (http://cross-browser.com/x/menus/xmenu1.php), and added another variation which is closer to what you need: menu opens onclick, closes onclick, and when opening closes all other open menus.
(sorry about changing names on ya :))
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.