+ 1

What am I doing wrong?

I'm trying to show the content when you hover over the button. Why wont it work? https://code.sololearn.com/WGZH7r4U3P5F/?ref=app

19th Jun 2018, 9:59 PM
Daniel Cooper
Daniel Cooper - avatar
15 ответов
+ 4
IDK Daniel Cooper that appears to be using jQuery but I don't see any so it may be a drop-down built in to the library. it's also not doing anything on hover for me just onclick.
19th Jun 2018, 11:47 PM
bobbie
bobbie - avatar
+ 4
Ok thanks John Wells I didn't know that.
19th Jun 2018, 11:50 PM
bobbie
bobbie - avatar
20th Jun 2018, 12:38 AM
John Wells
John Wells - avatar
+ 3
I'm not positive but I think you will need a lil JavaScript to do that https://developer.mozilla.org/en-US/docs/Web/Events/mouseover
19th Jun 2018, 11:03 PM
bobbie
bobbie - avatar
+ 2
It's not using any js or jq. That was added by me before I copied and pasted.
19th Jun 2018, 11:50 PM
Daniel Cooper
Daniel Cooper - avatar
+ 1
It's very possible. I have a code that does what I'm trying to achieve. But I don't understand how the person who wrote it got it to show on hover. Whenever I try the same thing, nothing happens. Also, ignore line 10. I was experimenting when I saved it xD https://code.sololearn.com/WGT24PcnSeS2/?ref=app here's the dropdown I'm referring to
19th Jun 2018, 11:41 PM
Daniel Cooper
Daniel Cooper - avatar
+ 1
ignore the jquery. I forgot I added that when I copied and pasted.
19th Jun 2018, 11:43 PM
Daniel Cooper
Daniel Cooper - avatar
+ 1
bobbie phones don't hover without clicking. Use laptop and it should hover correctly.
19th Jun 2018, 11:49 PM
John Wells
John Wells - avatar
+ 1
But whenever I try changing display:none; to display:block; on hover, nothing happens. So strange.
19th Jun 2018, 11:52 PM
Daniel Cooper
Daniel Cooper - avatar
+ 1
guys, I figured it out. I updated my code.
20th Jun 2018, 12:06 AM
Daniel Cooper
Daniel Cooper - avatar
+ 1
It just won't work when I hover the button. Maybe <input type="button"> will work.
20th Jun 2018, 12:07 AM
Daniel Cooper
Daniel Cooper - avatar
+ 1
nope. Would probably be best to just style a div
20th Jun 2018, 12:09 AM
Daniel Cooper
Daniel Cooper - avatar
20th Jun 2018, 9:45 AM
Daniel Cooper
Daniel Cooper - avatar
20th Jun 2018, 9:45 AM
Daniel Cooper
Daniel Cooper - avatar
0
I'm not sure where you came up with CSS line 10, but it isn't valid as far as I've ever seen. Without JavaScript, I don't believe you can do what you want.
19th Jun 2018, 11:26 PM
John Wells
John Wells - avatar