Nicola Ferrari - Ferro

Al mondo ci sono solo 10 tipi di persone: chi comprende il sistema binario e chi no

 

Plugin Jquery: ScrollNews

 

Example here

Compatibility  - 

This script is useful to "rotate" text/images; often it is useful at the side of the page to show news.  

Project specifications:

  • First of all, before to include the plugin, you have to include the Jquery library, downloadable here.
    Firstly you have to include the library, and then the plugin; if you don't follow this order, the project doesn't work
  • The html has to be organized as follows:
    • father DIV
    • N son DIV 
  • You shouldn't use the "padding settings" on father or son div; it is better to insert any style in other external divs


Params of plugin:

  • size (number of pixels expliciting the word 'px' --> '300px' )
  • timeout(waiting time between son scrolls; integer)
  • speed (news rotation speed -->'fast'/'medium'/'slow')
  • direction (rotation direction --> 'up'/'down')
  • onmouseover (stop in case of onmouseover --> 'stop'/'continue')

EXAMPLE OF HTML CODE:

<div id ='generale'>
    <div id ='son_one'> HTML CODE</div>
    <div id ='son_two'> HTML CODE </div>
    <div id ='son_three'> HTML CODE</div>
</div>


There has to be the parent tag (general) and the children have to be 'div' elements.
If you only want to scroll some pictures, the height of the images has to be equal, otherwise the excess will be invisible.

CALLING EXAMPLE:

$(document).ready(function(){

$("#generale").ScrollNews({
          inizialize : 'true',
          size : '130px',
          timeout : 2500,
          speed : 'fast',
          direction : 'down',
          onmouseover : 'stop'
});

});



Here are links for downloading the plugin both extended form and reduced form:
Version 1.0