Bienvenu sur le journal de matinfo.ch. Utilisez 'par Tags', 'Catégories' ou 'Recherche direct' sur votre droite, pour trouver le contenu désiré. Pour en savoir plus sur ce site, sélectionnez la page «À propos».

jQuery Secure Random Images

Discover my first JQuery plugin...

... only 6.5 Kb!

Use it to randomize a image on each load of the page with a secure cookie logic to don't display always the same image (specially useful with small number of images - min. 3 images require).

Use like this - JS code:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script> <script src=" jquery.imgrandom-1.1.js" type="text/javascript"></script> <script type="text/javascript"> $('#random1').imgRandom ({    image_width: 337,    image_height: 506,    // not mandatory if you use the full URL on the image path below    images_path: '/files/blog/imgrandom/',    images: [               [                   'http://www.google.com/',   // link                   'test 1',                   // link title                   '76549543.jpg'              // image or image with path               ],               [                   '/about/',                   'test 2',                   '76549562.jpg'               ],               [                   '/about/',                   'test 3',                   'e010697.jpg'               ],               [                   'http://yahoo.com',                   'test 4',                   '79365635.jpg'               ]            ]});</script>

and the HTML container:

<span id="random1"></span>


Download: jquery.imgrandom-1.1.js

demo here

Commentaires (2) Permalink

Fonts for Web?

Choosing the web fonts for creating a web site is one of the big challenge of the designer.

Mostly 40% of the impact of the design is made by the font choose and standard web font - font installed on most computer and open - this fonts offer at the end a very limited possibility.

Font Tester - a free online font comparison tool.

It allows you to easily preview and compare different fonts side by side with various CSS font styles applied to them. It is very useful for web developers who are looking for just the right font/style/color to use in their pages. To use it all you have to do is simply enter the text you would like to preview, modify the various CSS properties until you find a style you like, and then click on the Get CSS Code button to generate all the necassary CSS code to reproduce those styles in your webpage.

Entrées correspondantes:
django-assetpackager installation
Permalink
1-2/2