Welcome To Snipplr
Everyone's Recent JavaScript Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This snippet contains a text input field called 'abc' and we calling the checkNum function as the onclick action of a button 'btn'
0
916
posted 15 years ago by juzerali
This is the javascript code that enables you to create hover effects also in IE6. It's clean, it's light, it's super! :)
Apply that code to your document (eg. in <head></head>) and in css add like this:
ul li:hover, ul li.shover { your css st...
1
914
posted 15 years ago by mihael
Click on an input field with a prefilled value, if that value equals the default then select it, if not leave it as it was. Relies on jQuery.
2
1461
posted 15 years ago by 1man
<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
869
posted 15 years ago by Jman
Sometime, you need unique classes on the leave join button of the groups page. Place this script in your AC footer.
--<br>
For more tips and tricks checkout the <a href="http://www.kickdeveloper.com/resources">KickApps resources page</a>.
0
854
posted 15 years ago by krunkosaurus
There are several fixes out there that work in different ways, but none of them are perfect (especially regarding background images). Here's a list of the ones I've found that work reasonably well—try them out to find one that works for your w...
0
678
posted 15 years ago by wizard04
A bookmarklet that enabled a speed dial storing the data in webkit's SQL engine. There are bugs and a few conditions, read: [http://www.dom111.co.uk/blog/coding/webkit-speed-dial-bookmarklet/59](http://www.dom111.co.uk/blog/coding/webkit-speed-dial-b...
1
828
posted 15 years ago by dom111
see website for all information about that.
some more theory:
[color-scaling-function](http://stackoverflow.com/questions/168838/color-scaling-function)
[generate-color-for-a-power-meter-red-to-green](http://stackoverflow.com/questions/340209/gene...
0
1082
posted 15 years ago by localhorst
This enables you to center a horizontal unordered list that uses "float:left". Normally, this is almost impossible with pure CSS, but Javascript makes it easy. jQuery makes it even easier.
0
719
posted 15 years ago by corey
If you've ever been frustrated at fixing multiple double margin / duplicate character bugs in your page, using this handy jQuery snippit, you can wipe them away instantly!
This code requires the latest version of jQuery.
3
1084
posted 15 years ago by haxd
Everything works as expected for the setTimeout() function until you try to call a method inside your ‘class’ (there are no real classes in JavaScript). Something like this won’t work:
setTimeout(this.methodToCall, time);
Passing a string r...
0
1208
posted 15 years ago by eden159
Again, as part of the DCODR development I had to find a decent way to get the selection HTML
0
1866
posted 15 years ago by optimal
There's been a popular trend to use JavaScript to add target="_blank" to anchors with rel="external". So in the name of making everything in my site Prototype based I worked out a script to do just that.
2
818
posted 15 years ago by fruehjahr
Paste this code in your HTML to display the current year. This script is commonly used in the © copyright's current year.
4
872
posted 15 years ago by variantstudios