Welcome To Snipplr
Everyone's Recent Snippets Tagged jquery
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
A lovely little one liner that strips out all non alphanumeric chars first, then replaces the spaces with hyphens, then converts all to lowercase :D
0
661
posted 15 years ago by xtheonex
The markup would look like this:
<code> <input class="swap-value" type="text" value="Search"/ ></code>
2
855
posted 15 years ago by keith
Hi, all, this is the "checkFunction" extension for jQuery.
This extension takes two parameters:
1. fPointer
This parameter is the "possible" function to check
1.1 This parameter can be a String that is a function poi...
1
724
posted 15 years ago by amischol
<a href="javascript:(function(){var%20ids=[];jQuery('*').each(function(){if(this.id&&this.id!==''){if(ids[this.id]){console.log('duplicate%20id%20found:%20'+this.id,this,ids[this.id])}else{ids[this.id]=this}}});})();">Find duplicate IDs</a> (drag me...
1
966
posted 15 years ago by krunkosaurus
Excellent article on using a CSS Template layout system that makes customizing web pages a step easier.
3
874
posted 15 years ago by donjuanito909
HRs are a pain in the ass to style, so why bother? Wrap them in a DIV with a class of HR instead. (In your stylesheet, set .hr hr { display: none }).
This also ports the class of the HR up to the new parent DIV, allowing you to make a few differen...
1
598
posted 15 years ago by dougunderscorenelson
This adds a class to focused form elements (helpful for IE6/7), as well as adds a class to the input's parent (in this case, named "form-field").
1
774
posted 15 years ago by dougunderscorenelson
Quick script to find button elements (and elements with the "button" class) and wrap their innards in spans. Good for making rounded-corner buttons.
0
613
posted 15 years ago by dougunderscorenelson
https://www.chrisjmendez.com/2004/09/27/jquery-converting-all-the-items-in-a-select-element-into-a-string-array/
0
1129
posted 15 years ago by chrisaiv
I believe that Accrisoft has a fetch all images from db function built in, but you could always use some php to create the image array
5
992
posted 15 years ago by conspirator
Remove item (number or string) from array, using jQuery (method grep).
3
13663
posted 15 years ago by gustavopaes
Standard list markup, adds button to expand a super dropdown next to the link.
1
1011
posted 15 years ago by davebowker
One must escape "special characters" in id names using two backslashes.
0
824
posted 15 years ago by penguin999