jQuery slider left and right buttons, firefox doesn't work

邮差的信 提交于 2019-12-24 23:00:20

问题


i made this wordpress theme that displays the loop horizontally: http://zarifnyc.com/category/news/

<Script>
var curx = $('#blog').css(''); 
if(curx <= 0) {hide('#leftbutton')} else {show('#leftbutton')}
if(curx >= 25000) {hide('#rightbutton')} else {show('#rightbutton')}

$(function() 
{
  $('#rightbutton').click(function() {
$('#blogbox').animate({"left" : '-=1070px'});
return false;
});
  $('#leftbutton').click(function() {
$('#blogbox').animate({"left" : '+=1070px'});
return false;
});
  });
</script>

...it worked until i try to add an "if" statement to hide the left button on the first post, and right on the last (or use infinite scroll).

'just started to learn jQuery, so any help would be appreciated, thanks!

来源:https://stackoverflow.com/questions/27807731/jquery-slider-left-and-right-buttons-firefox-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!