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)');
سؤال
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!
المحلول
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)');
نصائح أخرى
USE THIS
if (st > lastScrollTop){
$('div#search-apartments #content-inner #search-box').css({'-webkit-transform':'translate3d(0, '+movepx+'px, 0)','-moz-transform:translate3d(0, '+movepx+'px, 0)'});
} else {
$('div#search-apartments #content-inner #search-box').css({'-webkit-transform':'translate3d(0, '+movepx+'px, 0)','-moz-transform:translate3d(0, '+movepx+'px, 0)'});
}
Thank you guys.
Alex, yours didn't work somehow but Sohail, yours works perfectly. I just extended your solution for IE and Opera and made this out of it:
$('div#search-apartments #content-inner #search-box').attr('style', '-webkit-transform:translate3d(0, '+movepx+'px, 0);-moz-transform:translate3d(0, '+movepx+'px, 0);-ms-transform:translate3d(0, '+movepx+'px, 0);-o-transform:translate3d(0, '+movepx+'px, 0)');
Again, thank you