Welcome To Snipplr
Everyone's Recent jQuery Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
jQuery
jQuery: Input text default value, clear value on click, if typed value erased, get default value back
Specifiy a default value to input text field. OnFocus, the default value clear and let you type a new value. If typed value is erased then the default value is set back.
2
1058
posted 13 years ago by cdurocher
This should enable you to clear elements such as search boxes effectively whilst maintaining usability.
Enjoy!
0
773
posted 13 years ago by Fitzgenius
This is made for a webservice that outputs varaiable data according to user input, ajax is called each time there is a change on the input.
0
967
posted 13 years ago by Cwerther
This is probably buggy and certainly not the most efficient way to do it.
0
889
posted 13 years ago by MikeAcreman
Enviar datos por medio de $.ajax, propidad de jquery que permite ocupar ajax con php en jquery, se puede ocupar para cualquier cosa
0
968
posted 13 years ago by serialk89
Вывод 1: ЕÑли задать функцию через jQuery.fn, то она будет работать Ñ Ñлементами найденными через функцию $(). КонтекÑÑ‚ Ñтой функции будет ÑодеÑ...
0
689
posted 13 years ago by stancox
This is a simple accordion plugin that i wrote. Hope it comes in handy.
0
696
posted 13 years ago by neilp123
Couple of ways to check if HTML5 form elements exist and use a fallback if they don't.
0
886
posted 13 years ago by vagrantradio
This one was not created by me, but I can't remember who originally created it. It does the same thing as the built in <code>:contains()</code> selector with one important difference, it's case insensitive. Since I usually type in all lower case (bad...
0
803
posted 13 years ago by FatFolderDesigner
Asà es cómo se tiene que hacer la llamada a jquery desde facebook
0
674
posted 13 years ago by serialk89
The comments for this are broken down into 2 parts, first the script is talked about, then theres a little about the HTML code that the script relies on. You can find more information at the URL, as well as an example of it in action. You can leave c...
0
797
posted 13 years ago by FatFolderDesigner
Plugin to get and set Element#style.display (e.g. "none" or "")
0
800
posted 13 years ago by kendsnyder
add the "a class" part in the body and the $('a.gallery') part between your javascript tags on the line right after $(document).ready(function() {
0
689
posted 13 years ago by gamblelyn
.closest and .find are very useful - surprised I haven't heard of them before.
0
806
posted 13 years ago by inreflection7
This function follows the following naming conventions: Give your checkboxes ID tags of "[contenttitle]trigger", where [contenttitle] is whatever you like. Then, give your hide-able content classes that match, without the "trigger". This function wil...
0
604
posted 13 years ago by gellpak