var containerHeight = $(".item").height();
$(".word-game .nWord").css({
"-webkit-transform" : "translate(0, " + containerHeight + ")"
});
here is my code, but it doesn't work. i'm really tired.
Just add px or % to your current function since translate doesn't know what to do with a plain integer.
var containerHeight = $(".item").height();
$(".word-game .nWord").css({
"transform" : "translate(0,"+containerHeight+"px)"
});
Making sure it works in all browsers :)
"-webkit-transform": "translate(0,"+containerHeight+"px)",
"-moz-transform": "translate(0,"+containerHeight+"px)",
"-ms-transform":"translate(0,"+containerHeight+"px)",
"-o-transform":"translate(0,"+containerHeight+"px)",
"transform": "translate(0,"+containerHeight+"px)"
translate()doesn't take integers as arguments.