jQuery Simple Slider allows you to quickly create a slide show feature from a simple list UL/LI :
1 2 3 4 5 | < ul > "Title 1" >< img title = "Subtitle 1" src = "image1.jpg" / >< / li > < them title = "Title 1"> < img title = "Subtitle 1" src = "image1.jpg" /> </ them > "Title 2" >< img title = "Subtitle 2" src = "image2.jpg" / >< / li > < them title = "Title 2"> < img title = "Subtitle 2" src = "image2.jpg" /> </ them > li > < will > ... </ them > </ ul > |
Any links, image, or sottotiolo, can be entered without any problems:
1 2 3 4 5 | < ul > "Title 1" >< a href = "#" >< img border = "0" title = "Subtitle 1" src = "image1.jpg" / >< / a >< / li > < them title = "Title 1"> < a href = "#"> < img border = "0" title = "Subtitle 1" src = "image1.jpg" /> </ a > </ them > "Title 2" >< img title = "Subtitle 2 with a <a href='#'> link < / a > " src="image2.jpg" /> < / li > < them title = "Title 2"> < img title = "Subtitle 2 with <a href='#'> link </ a > "src =" image2.jpg "/> </ them > li > < will > ... </ them > </ ul > |
Utilization
You can download the latest version directly from the repository on Google Code :
1 2 3 |
Once the page is loaded:
1 2 3 4 5 6 7 |
Options
You can pass a set of parameters to the method simpleSlider ():
1 2 3 4 5 6 7 8 | '0.7' ) , Caption alpha opacity (default '0 .7 '), '#000' ) Caption bgColor the background color (defaults to '# 000') , 'normal' , 'fast' or number of milliseconds ) default 'slow' bgSpeed Background image fade speed ('slow', 'normal', 'fast' or number of milliseconds) default 'slow' 'slow' , 'normal' , 'fast' or number of milliseconds ) default 'slow' Caption captionSpeed slideUp / slideDown speed ('slow', 'normal', 'fast' or number of milliseconds) default 'slow' '50px' ) Caption height height (default '50px ') CSS Object titleStyle for title CSS Object subtitleStyle for subtitle 4000 ) timeOut Milliseconds Between slide interval (default 4000) |










Very interesting, the only thing I perplime is the accessibility of these tools. In other words, it messes around with Javascript disabled, and the use of position: absolute makes it difficult to manage the layout when the user enlarges the text on the page (ctrl +). How to solve these problems? Thanks
@ Camu: a great question! The question, in fact, is quite wide. Put simply, trying to answer your question, we can divide the problem into two parts: Javascript is active and liquid layout.
Tools such as the one proposed by me necessarily depart from the assumption that Javascript is on and is properly loaded in the jQuery library. However, as in the case presented here, this type of script performs a runtime change to a pre-existing HTML, and often quite readable even without applying the script. This technique, known as the unobtrusive JavaScript (Unobtrusive Javascript), has as its main aim is to improve a page, which is already functioning and readable, performing additions only if JavaScript is enabled. However there is no real dividing line between a JavaScript "intrusive" and a "non-intrusive." For example, the Plugin I have presented could be considered semi-intrusive.
On the more distinctly dedicated to accessibility, such as the ability to enlarge the font, things are further complicated because it calls into play the bitmap used to build pages that usually do not suffer layoffs as fonts. To overcome the obstacle you must create a special graphics style sheets packaged well and use a variety of techniques (some of which require Javascript active) to "fix" a layout of this type at runtime.
But let's underline that some browsers have recently added internal capabilities, accessibility, to overcome some obstacles related to the current standard CSS and HTML. For example, you can "zoom in" not just the font, but the whole page, doing a real "optical zoom", allowing the entire layput to be still visible in the correct way (the bitmaps may appear a bit 'grainy) .
I believe that such matters should be an integral part of the "core" of a browser so developers may be removed from this type of problem.
Wow, that's a rispostona
Thanks for being so detailed ... I proceeded to take notes!
Hello, great script, ... and above all degradable.
I was wondering one thing, but it is possible to decide how much each slide devvo be the duration?
I mean, maybe some pictures are just titles, only 4 seconds and then the next, but if the image has a lot of text to be read should be at least 8 / 10 seconds ...
It would be useful, for example, indicating the duration of the image itself, such as a nice [... Lost ... ]
What do you think?
@ Santino Bivacqua:
I think I understand what you mean, although it has lost some of your comments ... and it seems a good idea. You could add an attribute, for example in a field
relor custom (see hours) and, if present, to decide individually for between one and another slide.As soon as I can I will update and I will quote you for the excellent advice. Thanks
Oops sorry, I put the tag
imgand I have not noticed ....Thank you very much, however my idea was to insert the amount in the rel attribute of the image
for example:
o ancora
rel="4"rel="speed[4]"or simplyrel="speed-4", orrel="4"would be more 'convenient, especially when using a template engine and show slides from database, it would also create JavaScript uncomfortable, but not impossible
@ Santino Bivacqua: in fact, exactly what I thought
[...] Inspired by the suggestion that Santino Bivacqua I plugged in jQuery Simple Slider can set a timeout for each slide [...]
You can place links to get the slides back and forth without having to wait the time out?
@ G @ Briele No, this features in this release has not been scheduled.