Implementing Flex Slider in Blogger

Flexslider is a jQuery slider plugin which has been created, developed and maintained by Tyler Smith and released for Smashing Magazine and its readers. As usual, the plugin is absolutely free to use in private and commerical projects. The plugin includes fade and slide animations, customizable options as well as all the navigation options you would expect in such a plugin — touch gestures inclusive! It uses simple, semantic markup to create the slider and is lightweight, weighing only 5 Kb (minified). The plugin has been tested in Safari 4+, Chrome 4+, Firefox 3.6+, Opera 10+, and IE7+. iOS and Android devices are supported as well. In five simple steps, you can have a fully responsive slider for your responsive design.

See Demo

Download


Steps to Add it to Blogger:

1.Login to the Blogger account


2. Now Go to Design > Edit HTML.


3.Now search for the </head> tag and paste the following code just Above/Before it. (How to copy code easily)
1<link rel="stylesheet" href="flexslider.css" type="text/css" media="screen" />
3 <script src="jquery.flexslider-min.js"></script>
4<link rel="stylesheet" href="demo.css" type="text/css" media="screen" />

Note: Please Host all the files on free hosting service like DropBox or Blogspot itself!

2.Go to the Post/Page/Gadget you want to add this plugin and then go to Edit HTML tab .



3.Now copy the code from below and paste it there. (How to copy code easily)

1<link rel="stylesheet" href="flexslider.css" type="text/css" media="screen" />
3 <script src="jquery.flexslider-min.js"></script>
4<link rel="stylesheet" href="demo.css" type="text/css" media="screen" />

Note: Please Host all the files on free hosting service like DropBox or Blogspot itself!

4.Now for adding the images into this plugin see the following markup:

01<div id="container">
02<div class="flexslider">
03     <ul class="slides">
04      <li>
05       <img src="1.jpg" />
06       <p class="flex-caption">Captions</p>
07      </li>
08      <li>
09       <a href="http://www.google.com"><img src="2.jpg" /></a>
10       <p class="flex-caption">This image is wrapped in a link!</p>
11      </li>
12      <li>
13       <img src="3.jpg" />
14      </li>
15      <li>
16       <img src="4.jpg" />
17      </li>
18     </ul>
19   </div></div>

The div block with id "container" is the outer wrapper of the images to be displayed.

The class "flex-caption" is used for displaying captions below the image

Now for hooking this to the Slider using this JavaScript:

1<script type="text/javascript">
2  $(window).load(function() {
3   $('.flexslider').flexslider();
4  });
5 </script>

5.Now save the Post/Page.

See Demo

Download


Artikel Yang Berhubungan:

Tidak ada komentar:

Informasi Umum - Kumpulan Artikel Bebas Baca © 2009 - Bookmarking