JSDoc Documentation
Summary
This program insert a random image using jquery library
The configuration of the images to be randomly display are in the banner.json file.
This file can contain either images (jpg, png) or flash.
- Images can have the attributes link and onclick. The src attribute is mandatory.
the onclick attribute aims to get statistics on the click on a image
- Flash can have the attribute width (default : 728) and height (defaut : 90). The attribute src is mandatory.
here is a example of the content of the banner.json file
[
{"src":"http://www.numerikids.com/alpha/wp-content/uploads/2009/06/mario_bros.jpg",
"link":"http://www.google.fr",
"onclick":"$.get(\"http:\/\/172.16.31.180\/rotateBanner\/vide.gif\");",
"options":"target=\"_blank\" style="\"border:purple dotted 3px;\""
},
{"src":"http://monophonik.com/wp-content/uploads/2009/06/mario-wii.jpg",
"link":"http://www.bing.com",
"onclick":"$.get(\"http:\/\/172.16.31.180\/rotateBanner\/vide.gif\");"
},
{"src":"http://www.nintendolesite.com/images/news/news_Nouveau_Mario_en_approche_titre.jpg",
"link":"http://www.yahoo.fr",
"onclick":"$.get(\"http:\/\/172.16.31.180\/rotateBanner\/vide.gif\");"
},
{"src":"http://www.vidalonline.com/vidal-theme/images/pub.swf",
"width":"728",
"height":"90"
}
]
To install in your website, follow these steps :
- configure the multiple banners in the banner.json file
- create a <div id="banner"></div> in your html file
- load jquery in your html file
- load this banner.js in your html file and call rotateBanner()
Version: 1.0
Author: Cédric Levasseur
|
File Summary
|
| rotateBanner.js |
This program insert a random image using jquery library
The configuration of the images to be randomly display are in the banner.json file.
This file can contain either images (jpg, png) or flash.
- Images can have the attributes link and onclick.
|
Documentation generated by
JSDoc on Fri Nov 19 19:39:02 2010