开发者

jQuery news rotator not breaking without JavaScript

开发者 https://www.devze.com 2023-02-24 17:08 出处:网络
I\'m trying to build a simple news rotator in jQuery and I\'m looking at examples on the internet. I\'m trying to achieve somethin开发者_如何学编程g like this http://www.webstylepress.com/jquery-smoo

I'm trying to build a simple news rotator in jQuery and I'm looking at examples on the internet.

I'm trying to achieve somethin开发者_如何学编程g like this http://www.webstylepress.com/jquery-smooth-news-rotator/ but I want it to NOT break when JavaScript is disabled, just show the first element. I know that this is a very frequently asked question, but all of the examples I have seen break somehow when JavaScript is disabled.


I suggest that you simply hide all elements except the first one by default (using CSS). You can adjust the styles later if JavaScript is enabled and start the slider afterwards.

0

精彩评论

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

关注公众号