Welcome To Snipplr
Everyone's Recent JavaScript Snippets Tagged javascript
- 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
919
posted 15 years ago by juzerali
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
872
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
855
posted 15 years ago by krunkosaurus
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
829
posted 15 years ago by dom111
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
722
posted 15 years ago by corey
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
1209
posted 15 years ago by eden159
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
In this example below I am moving the "recent blogs" module in "My Home" to the very top. I have placed this code in the footer of my Affiliate Center wrapped in script tags.
For maximum efficiency:
1) Use the inspect tool in Firebug to find the...
0
670
posted 15 years ago by krunkosaurus
This clean little script assumes you have a simple "A-name" style jump to some cool stuff at the bottom of the page that you want people to see. ID your link "browse" and your good. Certainly you could scroll to another ID on the page if you are so...
0
674
posted 15 years ago by esquareda
This is a basic script that will redirect a non-member to the login page with a custom message. Place the code between script tags in your Affiliate Center header.
To use:
1) replace loginPage variable with your *login URL.
2) replace accessMe...
0
549
posted 15 years ago by krunkosaurus
Use the Ka.Util.getLocationParam utility method to get the mediaType GET parameter:
--<br>
For more tips and tricks checkout the <a href="http://www.kickdeveloper.com/resources">KickApps resources page</a>.
0
673
posted 15 years ago by krunkosaurus
Función para usar con el evento onkeydown, que funciona igual en todos los navegadores. Onkeypress devuelve 0 para las teclas especiales en navegadores que no sean Internet Explorer.
0
846
posted 15 years ago by kcmr
Always always always backup client side validation with server side validation! =D
2
1016
posted 15 years ago by charmcitycoder
This is a very simple bookmarklet that will temporarily sort the *visible* messages in Gmail by subject. You'll have to run it again each time Gmail refreshes the list.
[Sort Gmail Messages](javascript:(function(){function%20f(r){var%20t=r...
0
1006
posted 15 years ago by wizard04
This takes a very readable date, such as "Fri, 4 Dec 2008 15:13:00 +0000", and outputs it as a relative date (such as "1 hour ago").
1
942
posted 15 years ago by bjarkebech