特效介绍
点击左边导航滚动的新闻列表jQuery插件。共分为左右两栏,左边是新闻标题列表,点击后,右边会从下面滑出相应的新闻,并且有“read more”来引导读者查看全文。左边还有左右分页按钮,以显示更多的列表。UI做的非常美观大方。
使用方法
1、在head引入下面的js和css代码:
01 | <link rel= "stylesheet" href= "css/style.css" type= "text/css" media= "screen" /> |
02 | <script src= "js/cufon-yui.js" type= "text/javascript" ></script> |
03 | <script src= "js/Bebas_400.font.js" type= "text/javascript" ></script> |
04 | <script type= "text/javascript" > |
05 | Cufon( '.cn_wrapper h1,h2' , { |
06 | textShadow: '-1px 1px black' |
09 | <style type= "text/css" > |
11 | text-shadow : 1px 1px 1px #fff ; |
13 | text-transform : uppercase ; |
21 | span.reference a:hover{ |
29 | text-shadow : 1px 1px 1px #fff ; |
2、下面是html代码
001 | < div class = "cn_wrapper" > |
002 | < div id = "cn_preview" class = "cn_preview" > |
003 | < div class = "cn_content" style = "top:5px;" > |
004 | < img src = "images/polaroidphotobar.jpg" alt = "" /> |
005 | < h1 >Polaroid Photobar Gallery with jQuery</ h1 > |
006 | < span class = "cn_date" >28/09/2010</ span > |
007 | < span class = "cn_category" >Tutorials</ span > |
008 | < p >In this tutorial we are going to create an image gallery with a Polaroid look. |
009 | We will have albums that will expand to sets of slightly rotated thumbnails |
010 | that pop out on hover.</ p > |
013 | < div class = "cn_content" > |
014 | < img src = "images/fullpageimagegallery.jpg" alt = "" /> |
015 | < h1 >Full Page Image Gallery with jQuery</ h1 > |
016 | < span class = "cn_date" >08/09/2010</ span > |
017 | < span class = "cn_category" >Tutorials</ span > |
018 | < p >In this tutorial we are going to create a stunning full page gallery with |
019 | scrollable thumbnails and a scrollable full screen preview. |
023 | < div class = "cn_content" > |
024 | < img src = "images/collapsingsitenavigation.jpg" alt = "" /> |
025 | < h1 >Collapsing Site Navigation with jQuery</ h1 > |
026 | < span class = "cn_date" >06/09/2010</ span > |
027 | < span class = "cn_category" >Tutorials</ span > |
029 | Today we will create a collapsing menu that contains vertical |
030 | navigation bars and a slide out content area. When hovering |
031 | over a menu item, an image slides down from the top and a |
032 | submenu slides up from the bottom. |
036 | < div class = "cn_content" > |
037 | < img src = "images/thumbnailsnavigation.jpg" alt = "" /> |
038 | < h1 >Thumbnails Navigation Gallery with jQuery</ h1 > |
039 | < span class = "cn_date" >29/07/2010</ span > |
040 | < span class = "cn_category" >Tutorials</ span > |
042 | In this tutorial we are going to create an extraordinary |
043 | gallery with scrollable thumbnails that slide out from a |
044 | navigation. We are going to use jQuery and some CSS3 |
045 | properties for the style. |
049 | < div class = "cn_content" > |
050 | < img src = "images/musicportfoliotemplate.jpg" alt = "" /> |
051 | < h1 >Music Portfolio Template</ h1 > |
052 | < span class = "cn_date" >26/07/2010</ span > |
053 | < span class = "cn_category" >Development</ span > |
055 | Today we want to share a music portfolio template with you. |
056 | The idea is to create an artist portfolio with a discography |
057 | line up and HTML5 audio player jPlayer. |
061 | < div class = "cn_content" > |
062 | < img src = "images/relatedpostsslideouts.jpg" alt = "" /> |
063 | < h1 >Related Posts Slide Out Boxes</ h1 > |
064 | < span class = "cn_date" >21/07/2010</ span > |
065 | < span class = "cn_category" >Tutorials</ span > |
067 | The main idea is to show a fixed list at the right side |
068 | of the screen with some thumbnails sticking out. When |
069 | the user hovers over the items, they slide out. |
073 | < div class = "cn_content" > |
074 | < img src = "images/LatestTweetsTooltip.jpg" alt = "" /> |
075 | < h1 >Latest Tweets Tooltip with jQuery</ h1 > |
076 | < span class = "cn_date" >20/07/2010</ span > |
077 | < span class = "cn_category" >Development</ span > |
079 | If you have a news website, it might be interesting |
080 | for you to allow your users to see the latests tweets |
081 | about a topic. Here is a jQuery plugin for showing the |
082 | latest tweets about a certain word or phrase. |
086 | < div class = "cn_content" > |
087 | < img src = "images/slidedownbox.jpg" alt = "" /> |
088 | < h1 >Slide Down Box Menu with jQuery and CSS3</ h1 > |
089 | < span class = "cn_date" >16/07/2010</ span > |
090 | < span class = "cn_category" >Tutorials</ span > |
092 | In this tutorial we will create a unique sliding box |
093 | navigation. The idea is to make a box with the menu |
094 | item slide out, while a thumbnail pops up. |
098 | < div class = "cn_content" > |
099 | < img src = "images/MinimalisticSlideshowGallery.jpg" alt = "" /> |
100 | < h1 >Minimalistic Slideshow Gallery with jQuery</ h1 > |
101 | < span class = "cn_date" >05/07/2010</ span > |
102 | < span class = "cn_category" >Tutorials</ span > |
104 | In today’s tutorial we will create a simple and |
105 | beautiful slideshow gallery that can be easily |
106 | integrated in your web site. |
110 | < div class = "cn_content" > |
111 | < img src = "images/imagehighlight.jpg" alt = "" /> |
112 | < h1 >Image Highlighting and Preview with jQuery</ h1 > |
113 | < span class = "cn_date" >04/07/2010</ span > |
114 | < span class = "cn_category" >Tutorials</ span > |
116 | In this tutorial we will show you how to highlight |
117 | and preview images that are integrated in an |
118 | article or spread over a page. |
122 | < div class = "cn_content" > |
123 | < img src = "images/photodesk.jpg" alt = "" /> |
125 | < span class = "cn_date" >01/07/2010</ span > |
126 | < span class = "cn_category" >Development</ span > |
128 | In this little experiment we created an interactive photo |
129 | desk that provides some “realistic” interaction possibilities |
135 | < div id = "cn_list" class = "cn_list" > |
136 | < div class = "cn_page" style = "display:block;" > |
137 | < div class = "cn_item selected" > |
138 | < h2 >Polaroid Photobar Gallery with jQuery</ h2 > |
139 | < p >Tutorial on how to create a gallery in polaroid style</ p > |
141 | < div class = "cn_item" > |
142 | < h2 >Full Page Image Gallery with jQuery</ h2 > |
143 | < p >Another tutorial on how to make a full page image gallery with some jQuery</ p > |
145 | < div class = "cn_item" > |
146 | < h2 >Collapsing Site Navigation with jQuery</ h2 > |
147 | < p >This tutorial shows how to create a stylish sliding site navigation</ p > |
149 | < div class = "cn_item" > |
150 | < h2 >Thumbnails Navigation Gallery</ h2 > |
151 | < p >This gallery will show images in a scrollable menu navigation</ p > |
154 | < div class = "cn_page" > |
155 | < div class = "cn_item" > |
156 | < h2 >Music Portfolio Template</ h2 > |
157 | < p >网页特效,jQuery代码,js特效</ p > |
159 | < div class = "cn_item" > |
160 | < h2 >Related Posts Slide Out Boxes</ h2 > |
161 | < p >Show users more of your articles with these slide out boxes</ p > |
163 | < div class = "cn_item" > |
164 | < h2 >Latest Tweets Tooltip with jQuery</ h2 > |
165 | < p >A Plugin for showing the latest tweets with a certain word in your article</ p > |
167 | < div class = "cn_item" > |
168 | < h2 >Slide Down Box Menu with jQuery and CSS3</ h2 > |
169 | < p >A menu with a nice effect</ p > |
172 | < div class = "cn_page" > |
173 | < div class = "cn_item" > |
174 | < h2 >Minimalistic Slideshow Gallery</ h2 > |
175 | < p >A compact image gallery for your website</ p > |
177 | < div class = "cn_item" > |
178 | < h2 >Image Highlighting and Preview</ h2 > |
179 | < p >Highlight and preview images that are integrated in an article</ p > |
181 | < div class = "cn_item" > |
182 | < h2 >Interactive Photo Desk</ h2 > |
183 | < p >我爱模板网,专业的免费网站模板下载站</ p > |
187 | < a id = "cn_prev" class = "cn_prev disabled" ></ a > |
188 | < a id = "cn_next" class = "cn_next" ></ a > |
3、在html代码后面加入下面的js代码:
02 | <script type= "text/javascript" src= "js/jquery.easing.1.3.js" ></script> |
03 | <script type= "text/javascript" > |
05 | var $cn_next = $( '#cn_next' ); |
06 | var $cn_prev = $( '#cn_prev' ); |
07 | var $cn_list = $( '#cn_list' ); |
08 | var $pages = $cn_list.find( '.cn_page' ); |
09 | var cnt_pages = $pages.length; |
11 | var $items = $cn_list.find( '.cn_item' ); |
12 | var $cn_preview = $( '#cn_preview' ); |
14 | $items.each( function (i){ |
16 | $item.data( 'idx' ,i+1); |
18 | $item.bind( 'click' , function (){ |
20 | $cn_list.find( '.selected' ).removeClass( 'selected' ); |
21 | $ this .addClass( 'selected' ); |
22 | var idx = $( this ).data( 'idx' ); |
23 | var $current = $cn_preview.find( '.cn_content:nth-child(' +current+ ')' ); |
24 | var $next = $cn_preview.find( '.cn_content:nth-child(' +idx+ ')' ); |
27 | $current.stop().animate({ 'top' : '-300px' },600, 'easeOutBack' , function (){ |
28 | $( this ).css({ 'top' : '310px' }); |
30 | $next.css({ 'top' : '310px' }).stop().animate({ 'top' : '5px' },600, 'easeOutBack' ); |
32 | else if (idx < current){ |
33 | $current.stop().animate({ 'top' : '310px' },600, 'easeOutBack' , function (){ |
34 | $( this ).css({ 'top' : '310px' }); |
36 | $next.css({ 'top' : '-300px' }).stop().animate({ 'top' : '5px' },600, 'easeOutBack' ); |
41 | $cn_next.bind( 'click' , function (e){ |
43 | $cn_prev.removeClass( 'disabled' ); |
46 | $ this .addClass( 'disabled' ); |
52 | $cn_list.find( '.cn_page:nth-child(' +page+ ')' ).fadeIn(); |
55 | $cn_prev.bind( 'click' , function (e){ |
57 | $cn_next.removeClass( 'disabled' ); |
60 | $ this .addClass( 'disabled' ); |
66 | $cn_list.find( '.cn_page:nth-child(' +page+ ')' ).fadeIn(); |
部分素材资源来源网站,本站提供免费下载,如有侵权请联系站长马上删除!