Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
slideUp & slideDown Trouble
Topic Started: Jun 26 2008, 08:30 PM (378 Views)
Roby
Member Avatar
Member
[ * ]
I'm working on an updated version of one of my mods, and it's for IF, but I'm using the code that enables jQuery on the board to make this code simple.
Code:
 
<script type='text/javascript'>
if(location.href.match(/showuser=/i)){
$("#profilename").append("<div id='drop_menu'>Profile Options</div><div class='dropsy'>Prof Test 1</div><div class='dropsy'>Prof Test 2</div>");
$(document).ready(function(){
$(".dropsy").hide();});
$("#drop_menu").mouseover(function(){
$(".dropsy").slideDown();});
$(".dropsy").mouseout(function(){
$(".dropsy").slideUp();});
}
</script>

I'm having trouble with the dropdowns because it doesn't slide up when I mouseout from the 'drop_menu' and it gets really buggy when I mouseover on the second 'dropsy'.
Any help is appreciated :D
Offline Profile Quote Post Goto Top
 
slayer766
Member
[ * ]
*cough*Why didn't you just ask over at TCZ*cough*

But this might fix your problem:

Code:
 
<script type='text/javascript'>
if(location.href.match(/showuser=/i)){
$("#profilename").append("<div id='drop_menu'>Profile Options</div><div class='dropsy'>Prof Test 1</div><div class='dropsy'>Prof Test 2</div>");
$(document).ready(function(){
$(".dropsy").hide();});
$("#drop_menu").mouseover(function(){
$(".dropsy").slideDown();});
$("#drop_menu").mouseout(function(){
$(".dropsy").slideUp();});
}
</script>
Offline Profile Quote Post Goto Top
 
Roby
Member Avatar
Member
[ * ]
Thanks slayer:)
Offline Profile Quote Post Goto Top
 
Dan T
Member Avatar
document.createElement("Alcohol")
[ *  * ]
why dont you use .slidetoggle()
try something like this. it will shorten your code :P
Code:
 

<script type='text/javascript'>
if(location.href.match(/showuser=/i)){
$("#profilename").append("<div id='drop_menu'>Profile Options</div><div class='dropsy'>Prof Test 1</div><div class='dropsy'>Prof Test 2</div>");
$(document).ready(function(){
$(".dropsy").hide();
$("#drop_menu").mouseover(function(){$(".dropsy").slideToggle();
});
});
</script>
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · jQuery Help · Next Topic »
Add Reply