Welcome To Snipplr
Everyone's Recent Snippets Tagged javascript
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Description: A function that add a class to an element if the element doesn't have anyone, if it already has one, add a new class name.
Arguments: The elemento to which you want to add the class and the name of the class you want to add.
From boo...
0
898
posted 13 years ago by alberomo
jLim is a small JavaScript base code. It can be used to built your own JavaScript library or framework.
0
920
posted 13 years ago by freelancephp
I took this out of an example in tutsplus, and I added a fadeIn action for aesthetic reasons.
0
1077
posted 13 years ago by luizlopes
Envia un mensaje a los amigos desde method send de facebook graph
0
741
posted 13 years ago by serialk89
This small javascript hides the table that holds statistical counters on hotdog.hu profile pages [footer part].
0
574
posted 13 years ago by Oroborus9
Matches the word starting with si or Si and containing : in the word also as an optional. The expression can be tested here http://rejex.heroku.com/
0
840
posted 13 years ago by punuhan
JavaScript
Set links with href to current page as active (or if in subnav set their parent to active)
look through the list items in your main nav and based on href of anchor tags this will set the top level link to have an 'active' class.
0
1146
posted 13 years ago by iammikecohen
This will check if object is an array object.
This will add isArray() method to Array native object. Can be used to check if passed in object is an array. Future ecmascript 5 will have this included. Can use this in the meantime.
Using instance...
0
839
posted 13 years ago by anagaiyahoocom
A really fucking cool and easy way to calculate the alpha value for microsoft gradient using Javascript. Particularly useful in the Firebug console. Like a calculator.
0
717
posted 13 years ago by inreflection7
This will detect if console.log is available in browser and display the message. Otherwise will display as alert message
0
716
posted 13 years ago by anagaiyahoocom
This is just a simple page full of XHTML to follow along with my JS book. A template.
0
865
posted 13 years ago by inreflection7