Any idea why this works in development, but not when deployed on heroku:
if $('#home-header').data('votable') == true
$('#mpimage1').addClass('mpimage')
$('#mpimage2').addClass('mpimage')
else
$('#mpimage1').removeClass('mpimage')
$('#mpimage2').removeClass('mpimage')
The CSS:
.mpimage {
width: 400px;
height: 250px;
overflow: hidden;
border-radius: 2px;
position: relative;
&:active {
top: 2px;
box-shadow: 0 5px 0 3px #ccd2d2, 0 7px 20px 6px #d5dbdb;
}
}
I need to do this because <div id="mpimage1"> and <div id="mpimage2"> are within a partial, and they are clickable when used on one page containing the partial, and they are not clickable on another page that uses the partial. I only want the :active effect to come into play when it is clickable. Thanks!
$(document).ready ->wrapper or similar? Does the code run at all?jQuery ->. It runs without a problem in my local environment, and the rest of the file (just not the add/removeClass portion) runs without issue when deployed.