- This topic is empty.
February 9, 2015 at 3:40 pm #195412
Not so sure I’m following proper protocol but I’ve created a the jquery at CodePen and saved, http://codepen.io/anon/pen/vEpYeb.js. Want to know how I can change the script to show on hover and hide on click. Any suggestions greatly appreciated! BTW, not a coder so be nice please!February 9, 2015 at 3:49 pm #195415
It would be more helpful if you created a functional demo rather than just posting the JS/JQ.
Also, show/hide what?
If something is hidden…how can you hover on it?
Or are you hovering on one thing and showing another?
Are you adapting someone else’s plug-in? Do they offer the option you want in their documenation?
Can you provide a link to the original plug-in source page?February 9, 2015 at 3:54 pm #195417
Thanks for the quick response. Sample page: http://biritesupermarket.com/TestingRebuild/bakery.html and yes, I’m using a plug-in from someone else, have contacted them with no response, http://biritesupermarket.com/TestingRebuild/js/showHide.js.February 9, 2015 at 4:19 pm #195421February 9, 2015 at 4:29 pm #195422
On thinking about this..I’m not sure this can be adapted. It’s using a click to toggle and, at least to my mind, a hover and a click would require two diferent functions.
JS folks…any thoughts?
I mean it’s simple enough to add a class on hover and remove it with a click but that’s two different things. Right?February 9, 2015 at 5:10 pm #195423ShikkedielParticipant
I have to agree there. Even more so, in JavaScipt it’s closer to three events because a hover is a chain of mouseenter and mouseleave. So I think TS is looking for a show on mouseenter and hide on click? Things could get complicated quickly (nevertheless they’re always doable)…
Would be good to know what the exact desired effect should be.February 10, 2015 at 5:32 am #195458February 10, 2015 at 8:05 am #195475
Thanks Paulie_D, this works great on desktop. However, on touch screen not staying open?February 10, 2015 at 8:10 am #195476
Nope…it’s hover only.
I haven’t done anything on tap or touch.February 10, 2015 at 8:26 am #195478ShikkedielParticipant
Looks slick, coding yourself is often the better option than using a plugin. Here’s a minor tweak for mobile :February 10, 2015 at 8:57 am #195481
JIC no one has told you guys, “You ROCK!” Thanks for all your help, patience and for sharing your time & talent.