Search code examples
phphtmltranslate3d

translate3d on firefox (moz) and safari (webkit)


how can I add some code so that my translate3d effect also works on firefox. The jquery code is:


if (st > lastScrollTop){

$('div#search-apartments #content-inner #search-box').attr('style', '-webkit-transform:translate3d(0, '+movepx+'px, 0)');

} else {

$('div#search-apartments #content-inner #search-box').attr('style', '-webkit-transform:translate3d(0, '+movepx+'px, 0)');

So how and where do I need to add the code for "-**moz**-transform:translate3d(0, '+movepx+'px, 0)"??

Thanks!


Solution

  • use this code this will help you to solve for firefox also

    $('div#search-apartments #content-inner #search-box').attr('style', '-webkit-transform:translate3d(0, '+movepx+'px, 0);-moz-transform:translate3d(0, '+movepx+'px, 0)');