Created
August 13, 2012 03:53
adding important css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#pantry_boxes-products").on("mouseover",".box-product",function(event) { | |
$(this).children(".box-product-expanded").stop(true,false).animate({ | |
opacity: 1, | |
"z-index": "50 !important" | |
}, | |
{ "duration": 150 } | |
); | |
}); | |
$("#pantry_boxes-products").on("mouseout",".box-product",function(event) { | |
$(this).children(".box-product-expanded").stop(true,false).animate({ | |
opacity: 0, | |
"z-index": -10 | |
}, | |
{ "duration": 150 } | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
line 4 is the one to note. you simply set your z-index to a string rather than a number to include the "!important" qualifier. Note that these styles will be applied inline as part of the jquery animation, so they are all implicitly "!important".