lshane
asked on
Change Mouseenter to permanent visibility
Hello, all.
I have a script that was available on the net for a fading slideshow. All is working fine.
I just want to tweak it one little bit.
The slideshow displays images in a fading manner. When the mouse enters the image area, a caption slides up from the bottom, and then it disappears when leaving the image area.
I would like the caption to remain on all the time.
I will attach the .js file.
I noticed in the script, around line 76-ish, that there are 3 lines of code that seemed relevant:
else if (setting.descreveal=="onde mand"){ //display desc panel on demand (mouseover)
setting.$wrapperdiv.bind(' mouseenter ', function(){slideshow.showh idedescpan el('show') })
setting.$wrapperdiv.bind(' mouseleave ', function(){slideshow.showh idedescpan el('hide') })
}
I see the "mouseenter" and "mouseleave" lines. I altered the "mouseleave" to "SHOW" when the mouse left the image, and that worked fine.
My main question is... is there some other handler (not sure what it's called) that could replace "mouseenter" so the caption would be on all the time. I tried removing the "mouseleave" line and removing the "mouseenter" portion to only have the function to "show" the panel, but that did not work.
The file is attached for context.
That little block of code seems to be where the action is for that feature, but being a Javascript amateur, I'm not sure how to make it permanently visible.
Your help is always appreciated.
Thanks,
Shane
fadeslideshow.js
I have a script that was available on the net for a fading slideshow. All is working fine.
I just want to tweak it one little bit.
The slideshow displays images in a fading manner. When the mouse enters the image area, a caption slides up from the bottom, and then it disappears when leaving the image area.
I would like the caption to remain on all the time.
I will attach the .js file.
I noticed in the script, around line 76-ish, that there are 3 lines of code that seemed relevant:
else if (setting.descreveal=="onde
setting.$wrapperdiv.bind('
setting.$wrapperdiv.bind('
}
I see the "mouseenter" and "mouseleave" lines. I altered the "mouseleave" to "SHOW" when the mouse left the image, and that worked fine.
My main question is... is there some other handler (not sure what it's called) that could replace "mouseenter" so the caption would be on all the time. I tried removing the "mouseleave" line and removing the "mouseenter" portion to only have the function to "show" the panel, but that did not work.
The file is attached for context.
That little block of code seems to be where the action is for that feature, but being a Javascript amateur, I'm not sure how to make it permanently visible.
Your help is always appreciated.
Thanks,
Shane
fadeslideshow.js
ASKER
Hi, gurvinder372.
Yeah, I tried that one before. It definitely keeps the caption visible... AFTER it slides up from the bottom, and it remains visible when leaving the area, and when it goes to the next slide without a caption.
I was just thinking that "mouseenter" could be replaced with something like "always", or something like that. I am truly shooting in the dark. I would think this little area is where the tweak would take place, but I'm not versed enough in Javascript to really parse the code effectively.
Any other ideas?
Yeah, I tried that one before. It definitely keeps the caption visible... AFTER it slides up from the bottom, and it remains visible when leaving the area, and when it goes to the next slide without a caption.
I was just thinking that "mouseenter" could be replaced with something like "always", or something like that. I am truly shooting in the dark. I would think this little area is where the tweak would take place, but I'm not versed enough in Javascript to really parse the code effectively.
Any other ideas?
or else you can do some thing simpler
setting.$wrapperdiv.mouseo ver(functi on() {
slideshow.showhidedescpane l('show');
});
check this
http://api.jquery.com/mouseover/
setting.$wrapperdiv.mouseo
slideshow.showhidedescpane
});
check this
http://api.jquery.com/mouseover/
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
that would likely be
var mySlideshow=new fadeSlideShow({"descreveal ":"always" });
var mySlideshow=new fadeSlideShow({"descreveal
ASKER
Perfect.
ASKER
Thank you, eoindevery.
I would not have thought it would have been in the HEAD section.
I found it and changed from "ondemand" to "always" = Worked perfectly.
Thank you!
Shane
I would not have thought it would have been in the HEAD section.
I found it and changed from "ondemand" to "always" = Worked perfectly.
Thank you!
Shane
i.e.
else if (setting.descreveal=="onde
setting.$wrapperdiv.bind('
setting.$wrapperdiv.bind('
}