S3 Slider Demo

Share on Facebook

If you are viewing this post in the post list (or home page), you will not see the animation. Click the title of the post to be taken to the actual page where you will see the animation.

JQuery S3Slider Plugin Demo

  • 1 Alone by the sea
    cloudy evenning by the sea
  • 2 Clouds
    The Clouds are gathering, lower layers and higher layers
  • 3 Country Sunset
    Country sunset sky with clouds
  • 4 Sunset by the Mountains
    Sunset against the backdrop of an arc of mountains
  • 5 A Awarm Sunset
    Good place to be when you want to ponder and retreat
  •  

 

Recently I stumbled on the S3Slider JQuery plugin and liked the look and feel of the transition animations and the behaviour of the overlayed text.

So I set out to try an implementation of the S3Slider slide show in blogengine. The good news is that there is a very good JQuery Extension for blogengine by John Callaway of http://www.internetblu.com.

This extension in my opinion provided a very good approach to deploying jQuery on BlogEngine and had done 99% of the job, In the sense that once installed you are able to load jQuery plus any other jQuery plugin on Posts and Pages.

The 1% involved calling JQuery functions or Plugin functions after the DOM has been loaded. In keeping with the BlogEngine tradition of doing add-on tasks via Extensions and widgets rather than modifying the core .aspx files, I decided to write two Extensions to help solve the 1% left to achieve the objective.

 

EXTENSION 1: Add Header File

The Add Header File Extension does what it says, It allows you to load a .css style sheet or a javascript file with full or partial path into a post or page.

The syntax is of the form:
[--AddHeaderFile:filename.css|filename.js;SCRIPTID]. Without the double dashes (--). The SCRIPTID parameter is used to prevent duplication of the script if there

is an attempt to load the same script again onto the page. 

 

EXTENSION 2: Add Script

The add script extension allows you to call JQuery and plugin functions from within the post or page. The Syntax is of the form:

[--AddScript:javascriptcode]

Without the double dashes (--)

 

With the above 2 Extensions and the JQuery Extension for blog Engine, I was able to achieve the S3Slider plugin effect in BlogEngine with the Code segment below:

 

[--AddHeaderFile:http://www.levitical.org/themes/nonzero/s3sliderMain.css;SLIDERCSS]
[--AddScript:$j=jQuery.noConflict();$j(document).ready(function(){$j('#slider').s3Slider({timeOut: 3000}); });]

The two dashes (--) are obviously not included in the code. The remainder is just Html markup in the form of an unordered list (ul) in a container div with id=slider. This container is the object we initialise the s3Slider script on in the AddScript Extension code above. The html markup code is listed below:
  • 1 Alone by the sea
    cloudy evenning by the sea
  • 2 Clouds
    The Clouds are gathering, lower layers and higher layers
  • 3 Country Sunset
    Country sunset sky with clouds
  • 4 Sunset by the Mountains
    Sunset against the backdrop of an arc of mountains
  • 5 A Awarm Sunset
    Good place to be when you want to ponder and retreat
  •  


Hope you find it imformative.

You may download the two Extensions from the archive link below. Upon extracting the files, drop the two extension files,
AddHeaderFile.cs and InjectJsCsriptToHeader.cs into the App_Code/Extensions folder and you are ready to roll. Please post any bugs, comments or feedback.

 

 

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkListkick it on DotNetKicks.comTwitThis

Comments are closed

About Me

When not scratching my head for solutions to software challenges, I spend my time playing with my little boy - Michael Jnr.

Quotations

"At 20 years of age the will reigns, at 30 the wit, at 40 the judgment."
Benjamin Franklin

Donate with PayPal - it

Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

View posts in large calendar

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2005 - 2012

Search