Welcome To Snipplr
Everyone's Recent Snippets Tagged class
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
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
1204
posted 15 years ago by eden159
very easy to use pagination class, see website for comments
1
1664
posted 16 years ago by localhorst
This is a simple javascript snippet that will allow you to specify a particular class to a group of checkboxes and then select them all at once when you click the master checkbox. This came in very handy for a store inventory script when I needed to...
0
1051
posted 16 years ago by aristoworks
Test harness for an implementation of the Luhn algorithm that checks the validity of a credit card number.
0
1239
posted 16 years ago by Uzbekjon
This is a version of Textile that only accepts paragraps, bold, italics, links, and images. Enjoy.
1
862
posted 16 years ago by evanwalsh
This bit of code allows you to turn code that looks like this:
x = {'foo':1, 'bar':2 }
x['foo'] = 3
Into this:
x = dictclass( {'foo':1, 'bar':2 } )
x.foo = 3
2
805
posted 16 years ago by kangell
Note: most of these will be available to the shell and Rails' console too.
2
868
posted 16 years ago by cczona