Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged javascript



1 ... 23 24 25 26 27 ... 33
This snippet contains a text input field called 'abc' and we calling the checkNum function as the onclick action of a button 'btn'
0 914 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 1459 posted 15 years ago by 1man
<p>How to use: HTML: &lt;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
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 827 posted 15 years ago by dom111
0 521 posted 15 years ago by abie
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 718 posted 15 years ago by corey
0 509 posted 15 years ago by manec
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 1207 posted 15 years ago by eden159
2 1170 posted 15 years ago by shahways
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 669 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 673 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 548 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 669 posted 15 years ago by krunkosaurus
Using JSON-P with jQuery. Note the callback.
0 946 posted 15 years ago by 1man
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 845 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
Add class external to all target=_blank links
4 982 posted 15 years ago by gfazioli
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(&#41;{function%20f(r&#41;{var%20t=r...
0 1006 posted 15 years ago by wizard04
Forces the redraw of the active document screen.
0 650 posted 15 years ago by preasha
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 939 posted 15 years ago by bjarkebech
1 ... 23 24 25 26 27 ... 33