javascript - How to make button appear at bottom of div on hover -


I am trying to add an effect to a site. I have a list of icons that are arranged in 2 groups of 3, which is made using a combination of boot slips-SM-4 using a set minimum-height of 6 squares total.

What am I trying to do when the user enters on any part of the div, this icon changes the image, and the visible creates the button below

before me Both of those features are working from the same, but to change the icon you have to be curved on the icon, and to see the button, you can see the & lt; P & gt; tags I'm looking for a way to change my state on moving them on my specific div.

html

  & lt; div class = "col-sm-4 info-item" & gt; & Lt; A href = "#" & gt; & Lt; img src = "../ desktop / icon1.png" onosauover = "it src = '.. / desktop / icon 1_read.png' 'on-houseout =" this src =' ../desktop/icon1.png & lt; bell & gt; & lt; div class = "icon-text" & gt; & lt; p & gt; increase your conversion rates, thereby increasing profit and customer acquisition. & lt; / P & gt; & lt; / div & gt; & lt; / a & gt; & lt; div class = "hidden-button" & gt; one type = "button" href = "#" class = "BTN BTN-Infection"> I class = "FA-FA-Plus-Circle FA-1X">     

CSS

  .info {padding: 100px;} .info-item {min-height: 350px! Important;} .info-item one {text-decoration: none! Important;} .info-item p {color: black! Important;} # hidden button i {color: red;} # hidden button a {text} -Security: none! Important;} .btn-infection {padding: 20px 10px; text-decoration: none; border color: # ef4035; boundary-radius: 3px; Font-size: 12px; Font weight: 700; color white! Important; Background color: # E9241D; }. Hidden Button A {Visibility: Hidden! Important; }. Hidden Button: A Visibility: Visible: Important; }   

I am trying to do this without javascript, but if Javascript is the only option, then I would gladly use JS.

If someone has done something like this, I would love to hear about it! Thanks for the help.

HTML

  & lt; div class = "col-sm-4 info-item" & gt; & Lt; A href = "#" & gt; & Lt; Img class = "change icon" src = "desktop / icon 1 page" & gt; & Lt; Hour & gt; & Lt; Div class = "icon-text" & gt; & Lt; P & gt; Increase your conversion rates, thereby increasing profit and customer acquisition. & Lt; / P & gt; & Lt; / Div & gt; & Lt; / A & gt; & Lt; Div class = "hidden-button" & gt; & Lt; One type = "button" href = "#" class = "btn btn-infection" & gt; & Lt; I class = "fa-fa-plus-circle fa-1x" & gt; & Lt; / I & gt; & Lt; Span & gt; Learn more & lt; / Span & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt;   

CSS .info {padding: 100px; } .info-item {min-height: 350px! Important; } .info-item one {text-decoration: none! Important; } .info-item p {color: black! Important; } #hidden button i {color: red; } # Hidden button a {text-decoration: none! Important; } .btn-infection {padding: 20px 10px; Text-decoration: None; Border color: # ef4035; Boundary-radius: 3px; Font-size: 12px; Font weight: 700; color white! Important; Background color: # E9241D; } .hidden-button {display: none; }

Jquery

  $ (document) .ready (function () {$ ('.col-sm-4 ') .mouseenter (function () {$ (' .conconchange '). attr (' src ',' /desktop/icon1_red.png ') $ (' hidden-button '). Show ();}) .mouseleave ( Function () {$ ('.conconchange'). Attr ('src', '/desktop/icon1.png') $ ('hidden-button'). Hide ();});});   

Not tested, but pretty sure what to do for you. Of course this will only work for a button and icon set. It will need more information to work with several div, icons and hidden buttons.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -