Welcome To Snipplr
Everyone's Recent JavaScript Snippets Tagged image
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Simle markup, simple CSS combined with ver straight forward javascript to produce some really cool effects.
0
820
posted 11 years ago by COBOLdinosaur
Via @lmgalmeida
Usage:
data-src="image.jpg" src="loader.gif"
$("img").unveil();
0
851
posted 12 years ago by digitalclubb
Funció que agafa les mides de la pantalla i redimensiona proporcionalment una imatge per a que s'adapti a ella.
0
823
posted 13 years ago by hectorlorenzo
wrote this snippet as a necessity to preload many images without writing same code all the time in JS...
0
806
posted 13 years ago by alik
image rollovers in jquery are usually super easy. However it sucks when working with absolute image paths - like a separate media server or CDN. Heres a quick snippet using substring and lastIndexOf to swap out the image src.
0
834
posted 13 years ago by inreflection7
Annoy your visitors, fool your friends, fun and party. Please note that this also disables ability to write in form fields.
0
655
posted 13 years ago by stephcode
What's so special about this JavaScript slideshow? By moving your cursor all over the webpage you create a nice distortion effect on your images.
0
737
posted 13 years ago by fabulant
Hey,
I just thought I would share something I made that I tested in IE6, IE8, Firefox 3.6, and Chrome 4. It allows you to resize a client-side image map based on the size of the image, so when your image resizes, your map still works how you want...
0
829
posted 14 years ago by xtknight
adapted from:
[http://aktuell.de.selfhtml.org/artikel/javascript/fader-framework/bilderslideshow.htm](http://aktuell.de.selfhtml.org/artikel/javascript/fader-framework/bilderslideshow.htm)
0
787
posted 14 years ago by cfleschhut
The canvas drawImage size default is 300 x 150, so it's using the CSS to resize the canvas. Example posted at http://pastebin.me/76aed7005b1b413ea3c479287f4dbd59
0
1317
posted 15 years ago by Motty
<p>How to use: HTML:
<img id="image" src="image.png" alt=""/></p>
<p>JavaScript:
add_reflection (document.getElementById ( 'image'), 1, 1, 0.1, 0); </p>
<p>As a result, the script wrap image in the div, ask him to the desired height and...
2
865
posted 15 years ago by Jman
Firefox ignores the alt tag on images and uses the title tag whereas IE uses the alt tag. This javascript code copies the text in all image alts to the image's title. Best when placed at the footer of each page
1
864
posted 16 years ago by ezerick
How to use:
1) < script type="text/javascript" src="path-to-file.js"...
2) < body onload="oHW.preMontar('img1_on.jpg','img2_on.jpg','img3_on.jpg');"...
3) < a href="#" onmouseout="oHW.Restore()" onmouseover="oHW.Cambiar('mnind','img1_on.jpg'...
2
1005
posted 16 years ago by hellion