What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: How to add hover effect for product price in brooklyn theme??

How to add hover effect for product price in brooklyn theme??

gurman
Tourist
21 0 1

How to add hover effect for product price in brooklyn theme??

Replies 27 (27)

Zworthkey
Shopify Partner
5581 642 1583

@gurman 


Welcome to the Shopify community!
Thanks for your good question.


Please share your store URL.
So that I will check and let you know the exact solution here.

Sajeel
Shopify Partner
272 31 26

share store url

Denishamakwana
Shopify Partner
1408 173 232

Welcome to shopify community.

Please share your store URL and if your store is password protected then please provide password too.

Thank you.

If helpful then please Like and Accept Solution. Want to modify or custom changes on store Hire me. Feel free to contact me on denishabhensdadiya@gmail.com | Shopify Design Changes | Custom Modifications In to Shopify Theme
gurman
Tourist
21 0 1
Sajeel
Shopify Partner
272 31 26

@gurman  what you need to do on hover on price?

Zworthkey
Shopify Partner
5581 642 1583

@gurman 

 

span.grid-product__price:hover {
    color: red !important;
}

 

Add this code in the bottom of the theme.css file

1. Navigate to Online Store->Theme->Edit code
2. Asset->/theme.css ->paste above code at the bottom of the file.
3. Save it.

gurman
Tourist
21 0 1

did not work

gurman
Tourist
21 0 1

also theme.css is not there in brooklyn

Sajeel
Shopify Partner
272 31 26

@gurman  its working refresh and then check

gurman
Tourist
21 0 1

but where add it??

gurman
Tourist
21 0 1

i can't find theme.css in assets

'

Sajeel
Shopify Partner
272 31 26

you have theme.scss not theme.css

gurman
Tourist
21 0 1

ok 

 

gurman
Tourist
21 0 1

Screenshot (20).png

gurman
Tourist
21 0 1

did this but still not working

Sajeel
Shopify Partner
272 31 26

@gurman  its working

Sajeel_1-1648729965412.png

 

 

gurman
Tourist
21 0 1

by hover price, i meant, that the product prices stay hidden unless we hover over the product

Sajeel
Shopify Partner
272 31 26

@gurman  ok then add this code and try

span.grid-product__price{ display:none !important }

span.grid-product__price:hover { color: red !important;display:block !important ;}

gurman
Tourist
21 0 1

https://crepdogcrew.com/ see this website for example

i want the hover like this

gurman
Tourist
21 0 1
Sajeel
Shopify Partner
272 31 26

@gurman  use the code i provided

gurman
Tourist
21 0 1

I DID BUT THE PRICE IS STYAING HIDDEN, NOT POPPING UP ON HOVERING THROUGH

Sajeel
Shopify Partner
272 31 26

use this code

@gurman  for animation use this code

span.grid-product__price{ display:none !important }

span.grid-product__price:hover { color: red !important;display:block !important ;transition: color .2s ease-in-out;}

gurman
Tourist
21 0 1

@Sajeel 

 

gurman
Tourist
21 0 1

pasted the code but still can't see it working

@Sajeel 

Sajeel
Shopify Partner
272 31 26

remove previous code and add this one in theme.scss

span.grid-product__price{ display:none;color:red !important; }

 

add this code in theme.js 

$(document).ready(function(){
$(".grid-product__wrapper").hover(function(){
$("span.grid-product__price").css("display", "block");
}
});

gurman
Tourist
21 0 1

@Sajeel did but it changed the allignment on the website and also the price is not changing