首页 > Other > 动态改变body背景色的jq代码

动态改变body背景色的jq代码

foto294vawi

//Change the body background color jQuery('#slideshow').bind('slide_complete', function(e, slider){ //Define the new background color var count = slider.currentPage;
var bgColor = jQuery('#slideshow li:eq('+count+')').children('a').attr('data-bg'); jQuery('body').animate({ backgroundColor: bgColor }, 600); });
分类:Other
  1. 还没有评论。
  1. No trackbacks yet.

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: