开发者

Problem with AnythingSlider when only having one post

开发者 https://www.devze.com 2023-01-15 07:46 出处:网络
I\'m using AnythingSlider, but i get an error if i only have one slide item. It gives me this error: \'base.$navLink开发者_如何学Gos\' is null or not an object.

I'm using AnythingSlider, but i get an error if i only have one slide item.

It gives me this error: 'base.$navLink开发者_如何学Gos' is null or not an object. The problem should be on line 149 in my jquery.anythingslider.js file. Which is the 3rd row in this bit of code:

if (base.options.buildNavigation){
   base.$nav.find('.cur').removeClass('cur');
   $(base.$navLinks[page - 1]).addClass('cur');
};

Let me know if i need to paste the whole jquery.anythingslider.js file.

Thanks


Changing the offending line to:

(page > 1) && $(base.$navLinks[page - 1]).addClass('cur');

fixed that for me.


This was fixed in the latest version.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号