Advertisement
There are a lot of free scripts to create a content slider. One of the example is SmoothGallery by JonDesign. But, if you are using jQuery and don’t want to install another JavaScript library, then you may need to consider jQuery slider plugin.
Today, i am going to provide a tutorial on using jFlow, a minimalist jQuery plugin to create a content slider. Readers are required to have basic XHTML/CSS and JavaScript skills. I will provide a download link after this tutorial. This is the first tutorial post on WebDesignBooth, and i will write more tutorials in future.

So, let’s start to create our content-slider now. Download both jQuery and jFlow before you proceed.
- Create a style.css file, and insert the following code into the file:
#jFlowSlide{ background:#DBF3FD; font-family: Georgia; } #myController { font-family: Georgia; padding:2px 0; width:610px; background:#3AB7FF; } #myController span.jFlowSelected { background:#43A0D5;margin-right:0px; } .slide-wrapper { padding: 5px; } .slide-thumbnail { width:300px; float:left; } .slide-thumbnail img {max-width:300px; } .slide-details { width:290px; float:right; margin-left:10px;} .slide-details h2 { font-size:1.5em; font-style: italic; font-weight:normal; line-height: 1; margin:0; } .slide-details .description { margin-top:10px; } .jFlowControl, .jFlowPrev, .jFlowNext { color:#FFF; cursor:pointer; padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px; } .jFlowControl:hover, .jFlowPrev:hover, .jFlowNext:hover { background: #43A0D5; }
- Open your main document and include the style.css, jQuery, and jFlow in the <head> tag.
<link rel="stylesheet" href="style.css" type="text/css" media="screen" /> <script language="javascript" type="text/javascript" src="jquery-1.3.2.min.js"></script> <script language="javascript" type="text/javascript" src="jquery.flow.1.2.js"></script>
- Then add this simple JavaScript code to define the settings for jFlow
<script type="text/javascript"> $(document).ready(function(){ $("#myController").jFlow({ slides: "#slides", // the div where all your sliding divs are nested in controller: ".jFlowControl", // must be class, use . sign slideWrapper : "#jFlowSlide", // must be id, use # sign selectedWrapper: "jFlowSelected", // just pure text, no sign width: "610px", // this is the width for the content-slider height: "235px", // this is the height for the content-slider duration: 400, // time in miliseconds to transition one slide prev: ".jFlowPrev", // must be class, use . sign next: ".jFlowNext" // must be class, use . sign }); }); </script>Think #slides as a container, which contain all slides, while .jFlowControl is the controller which let us go to the individual slide. As you can see from the style.css, we have 300px .slide-thumbnail to display our image, 290px .slide-details to display our title and description. Besides these, we have 10px margin-left for the .slide-description and 5px padding for the .slide-wrapper. So totally we need 610px width. For the “height” setting, you need to estimate the maximum height for your content. Here, i will use 235px as an example.
- Now is the turn to create the individual slide. The slide is contained in the #slides div. Here, i will conly show one slide. You may refer the source code for more info.
<div class="slide-wrapper"> <div class="slide-thumbnail"> <!-- image here --> </div> <div class="slide-details"> <h2><!-- title here --></h2> <div class="description"> <!-- description here. --> </div> </div> <div class="clear"></div> </div>We will wrap everything in a .slide-wrapper class, and float our thumbnail to the left while our content to the right. Don’t forget to clear the floats also. Replace image, title, and description with your own content.
- After that, we may add controls to the slides, which are resides in a #myController div.
<span class="jFlowPrev">Prev</span> <span class="jFlowControl">1</span> <span class="jFlowNext">Next</span>
The .jFlowPrev and .jFlowNext are necessary controls to go to previous and next slides, while .jFlowControl is a “button” to jump to any particular slide. The number of .jFlowControl span is depends on the number of slides you have.
- That’s all!! We had done everything. You can view the demo or download the source code to use in your own project.
Update:
You may download the auto scroll version here.



Pingback: Step By Step To Create Content Slider using jFlow, A Minimalist jQuery Plugin | Design Newz
Pingback: CSS Brigit | Step By Step To Create Content Slider using jFlow, A Minimalist jQuery Plugin
Pingback: tripwire magazine | tripwire magazine
Pingback: The Technology Post for May 21st - Jason N. Gaylord's Blog
Pingback: 7 Excellent JavaScript Content Sliders
Pingback: 15 jQuery Plugins For A Better Photo Gallery And Slideshow
Pingback: 15个最佳jQuery幻灯插件和实例| Ajax| 前端观察
Pingback: Ücretsiz Jquery Slider İçin En İyi 15 Örnek « Bay Bedava – Netten Başlıklar
Pingback: 12 Easy-to-Implement jQuery effects for your Website « Web Design / Development Blog :: Alt Creative
Pingback: The best tutorials combining HTML,CSS,PHP and JQuery | blogfreakz.com
Pingback: 13 Super Useful jQuery Content Slider Scripts and Tutorials | Web Design Ledger
Pingback: Slider Scripts & Tutorials – jQuery | Lamiani Project
Pingback: 13 Super Useful jQuery Content Slider Scripts and Tutorials | huibit05.com
Pingback: Ücretsiz en iyi 15 jquery slider manşet haber | e-dunyam.com
Pingback: 40+ Fresh And New jQuery Plugins Of Slider’s And Gallery’s - Themeflash : One Stop For All Your Web Resources
Pingback: 13 Super Useful jQuery Content Slider Scripts and Tutorials | Downrex
Pingback: 13 tutoriels de slider jQuery | WebCssDesign
Pingback: Ultimate collection of top jQuery tutorials, tips-tricks and techniques to improve performance « Technosiastic!
Pingback: 网页色妓个人网站-网页前端-网页设计 » 15个常用jQuery滑动插件和教程
Pingback: Outpus • Soloaga Designs » 13 tutoriais para fazer Slideshow e Carrossel com Jquery
Pingback: jQuery Blend | WebDesignExpert.Me
Pingback: A Fresh Start of 2010 « Floating Reverie
Pingback: SlideDeck – Cool jQuery Plugin For Slideshow | Afif Fattouh - Web Specialist
Pingback: 10 Useful jQuery Slider Tutorials - InterworkLabs
Pingback: 15个最佳jQuery幻灯插件和教程
Pingback: 15个最佳jQuery幻灯插件和教程 | Eric's Blog
Pingback: A Minimalist jQuery Plugin | Ajaxmint - Endless Ajax samples on jQuery, MooTools, ExtJS, Dojo, Prototype and PHP
Pingback: jquery content sliders gösterim eklentileri « Bay Bedava – Netten Başlıklar
Pingback: 会写代码的熊猫 Blog» 分享十五个最佳jQuery幻灯插件和教程
Pingback: 25 Very Detailed jQuery Image and Content Slider Tutorials |
Pingback: Best jQuery Feature Content Slider plugins and tutorials - Wsblogz.com – Web design magazine
Pingback: Awesome jQuery Content Slider Scripts and Tutorials | Linux Support & Tutorials - Booser.com
Pingback: Best jQuery Feature Content Slider plugins and tutorials
Pingback: 13 super slides com Jquery « Diretório Técnico
Pingback: Step By Step Membuat Content Slider menggunakan jFlow, minimalis jQuery Plugin | GAPWEBID
Pingback: Ultimate collection of top jQuery tutorials, tips-tricks and techniques to improve performance
Pingback: Anonymous
Pingback: BeautyCss » Blog Archive » 15款漂亮的JQuery幻灯片插件
Pingback: Slider de conteúdo em jQuery | Kasamata
Pingback: 17 Most Beautiful Sliders, Using Javascript, Jquery and Ajax | Floupy Design Blog
Pingback: 25 jQuery and CSS Image Gallery/Slider Plugins | ilkaymola.com
Pingback: 13 tutoriels de slider jQuery | Creation site Intenet et logiciel, web agency Lyon – Blog AVANIM
Pingback: 15个最佳jQuery幻灯插件和教程 · WebKook
Pingback: featured content jquery ajax (mise en avant) | Thin:Media
Pingback: jQuery Image Slideshow and Content Slider « CSS & JQuery Sample - FreshDesignWeb
Pingback: More on jQuery: Slider Plugins and Tutorials - Noupe Design Blog
Pingback: 13 супер полезных jQuery скрипта для создания слайдера «Рекомендуемые» « 4script.site40.net
Pingback: 13 Exellent jQuery Content Slider Scripts and Tutorials | PROPERTY Instings
Pingback: More on jQuery: Slider Plugins and Tutorials | Woupe Design Blog
Pingback: More on jQuery: Slider Plugins and Tutorials | Woupe Design Blog
Pingback: 15 Top jQuery Sliders Examples
Pingback: 40+ Useful jQuery and Ajax Based Sliders, Tutorials & Scripts | SmashinGeeks
Pingback: jQuery幻灯片 – 你能行
Pingback: 15个最佳jQuery幻灯插件和实例 « 蝌蚪网赚联盟
Pingback: 最佳15个jQuery幻灯插件和实例 | 阿越的博客
Pingback: Create A Vertical Scrolling News Ticker With jQuery and jCarousel Lite « Swadesh's Technology Note
Pingback: 50 slider, gallerie fotografiche, plugin, tutorial in jquery – Parte II
Pingback: Just Great 89 Unique jQuery Slider Tutorials And Plugins
Pingback: 13 супер полезных jQuery скрипта для создания слайдера “Рекомендуемые” | 4script.site40.net | Best Scripts For Webmaster
Pingback: 13 Super Useful jQuery Content Slider Scripts and Tutorials
Pingback: 19 Useful Jquery Image Slider Plugins and Tutorials | Web Design Burn
Pingback: Step By Step To Create Content Slider using jFlow, A Minimalist jQuery Plugin | WEBBLOGVN.COM
Pingback: 15个最佳jQuery幻灯插件和教程 | QQPCC的个人博客
Pingback: 4scd.co.cc » 13 супер полезных jQuery скрипта для создания слайдера “Рекомендуемые”
Pingback: jQuery的19个 图片滑动插件和教程 | sfps's blog
Pingback: Suggest a jquery slider ... - NamePros.com
Pingback: jQuery资源:19个jQuery 图片滑动插件和教程 | 飞扬网络博客
Pingback: 10 Useful jQuery Slider Tutorials - Tutsplace
Pingback: 19个非常有用的jQuery图片滑动插件和教程 | OpenSource8 | 专注互联网开源资源分享
Pingback: 15个最佳jQuery幻灯插件和教程 | 分享有趣的事, 聪子's blog
Pingback: 13个超级有用的 jQuery 内容滚动插件和教程 | 移动应用开发工作室
Pingback: 13个实用的jQuery内容滚动插件 | 前端开发 页面重构 html5 css3 专注于用户体验 JSHTMLCSS.COM
Pingback: 13个超级有用的 jQuery 内容滚动插件和教程 | 何炜光
Pingback: 13个jQuery内容滚动插件-站博
Pingback: 73 tutoriels pour faire défiler vos contenus (Slideshow, Sliders & Diaporama)
Pingback: 25个非常棒的jQuery滑块插件和教程 | 冯小强技术博客,Q1前端开发
Pingback: 25个最好的jQuery滑块插件 | 无名小站
Pingback: 19 a very useful jQuery picture sliding plug-ins and the tutorial
Pingback: 17 Most Beautiful Sliders, Using Javascript, Jquery and Ajax | Floupy Media
Pingback: Create A Vertical Scrolling News Ticker With jQuery and jCarousel Lite | jakartagoid
Pingback: 15个最佳jQuery幻灯插件和教程 | 前端视界
Pingback: 19个非常有用的 jQuery 图片滑动插件和教程 - Iecho
Pingback: Excellent tips on JQuery « Itmyprofession's Blog
Pingback: 15个最佳jQuery幻灯插件和教程
Pingback: SlideScript With Images? | SeekPHP.com
Pingback: 15个最佳jQuery幻灯插件和教程 | uedchina 专注于用户体验设计
Pingback: 390 ressources Javascript & jQuery
Pingback: Kỹ thuật lập trình .com » Jquery Effect » 40+ Fresh And New jQuery Plugins Of Slider’s And Gallery’s Tutorials
Pingback: Kỹ thuật lập trình .com » Jquery Effect » 13 Super Useful jQuery Content Slider Scripts and Tutorials
Pingback: 25 Very Detailed jQuery Image and Content Slider Tutorials : Web design
Pingback: 40+ Useful jQuery and Ajax Based Sliders, Tutorials & Scripts
Pingback: Wordpress Magazine Themes: The Beginner Guide and Showcase Of 50 Free Magazine Themes
Pingback: WordPress Magazine Themes: The Beginner Guide and Showcase Of 50 Free Magazine Themes | Blogs – NG Outsourcing
Pingback: 25个非常棒的jQuery滑块插件和教程 | 尘土
Pingback: 再次分享19个非常有用的 jQuery图片滑动插件和教程 - WEB开发笔记
Pingback: 再次分享79个非常有用的 jQuery图片滑动插件和教程 | 引领人生
Pingback: Create A Vertical Scrolling News Ticker With jQuery and jCarousel Lite | JS Tips
Pingback: 2012最新酷炫幻灯片(JQuery插件) | 海派天空 — HTML5+CSS5
Pingback: 25 Ayrıntılı jQuery İçerik ve Resim Slider Örneği | Sedat Kumcu
Pingback: Useful jQuery Content Sliders | WebWorks
Pingback: 图片滑动幻灯片jQuery插件和教程 | Nono's Blog
Pingback: 13 Super Useful jQuery Content Slider Scripts and Tutorials « « MegaTeacher | Let's start learning MegaTeacher | Let's start learning
Pingback: 13个超级有用的 jQuery 内容滚动插件和教程 | ued吧
Pingback: 分享15个最佳jQuery幻灯插件和教程 | PHP爱好者
Pingback: 15 Slider Script và hướng dẫn thực hiện có thể bạn quan tâm « Nguyen Duy Nhan
Pingback: 13 Super Useful jQuery Content Slider Scripts and Tutorials - MegaTeacher | Let's start learning MegaTeacher | Let's start learning
Pingback: 给了我无限惊喜的JQuery插件 | U的心灵旅行
Pingback: 分享15个最佳jQuery幻灯插件和教程 @ dodo糯
Pingback: 2012最新JQuery插件 - 酷吧
Pingback: 10 UI jQuery Sliders Plugins for Wordpress
Pingback: 15个最佳jQuery幻灯插件和教程 | S9Tech
Pingback: 15个最佳jQuery幻灯插件和实例 | 闹心 Naoxx 资源
Pingback: 分享十五个最佳jQuery幻灯插件和教程 | 站长站
Pingback: 13个超级有用的 jQuery 内容滚动插件和教程 | 站长站