Welcome To Snipplr


Everyone's Recent Snippets



1 ... 121 122 123 124 125 ... 552
I used this because I had a legacy db table that all fields are char. the right spaces were a pita. The rightTrim function can be viewed in my profile
0 1746 posted 15 years ago by m3rol666
Initializing a popup
1 1809 posted 15 years ago by cpres
Namespaces for enable browsers redering stuff for facebook's fbml, Google+1 and WAI-ARIA attributes in XHTML served as application/xml+html.
0 4241 posted 15 years ago by leobetosouza
Comes in handy for php magic functions such as __get and __set. This behaviour is fixed in php 5.3. Returns true also for private and protected properties using a reflectionclass
0 2092 posted 15 years ago by Roen
Get posts from a Custom Post Type
0 4236 posted 15 years ago by i-am-andy
Useful snippet for getting a specific number of posts from a specific category, useful for news listing in sidebar
0 1818 posted 15 years ago by i-am-andy
declare all custom fields first
0 1705 posted 15 years ago by mesh606
0 1763 posted 15 years ago by m1b
By omitting [end] it will remove all to the end. Set an [end] with a negative value to count back from the end of the elements. fadeOut is unnecessary.
0 2209 posted 15 years ago by lewiswalsh
0 2977 posted 15 years ago by rprol
Thanks to followgram.me you can read a public feed with your photos. Use this code to retrieve your Instagr.am photos and use them on your web.
0 2517 posted 15 years ago by ginoplusio
Questa piccola funzione riceve come argomento uno unix timestamp e ritorna una stringa contenente la "descrizione verbosa" della differenza di tempo. Ad esempio, usando il timestamp relativo a 5 minuti e mezzo fa, ritornerà la stringa "5 minuti e 30...
0 1668 posted 15 years ago by claudiowebdesign
Check if user has intruded a real email address. Return true (real email) or false (fake email). Arguments: Element from a form. From book Dom Scripting by Jeremy Keith
0 3284 posted 15 years ago by alberomo
Arguments: Element from a form. Take that element and checks if is filled. If not, returns false. If is filled, returns true. From book Dom Scripting by Jeremy Keith
0 3355 posted 15 years ago by alberomo
I create this recursive function to remove and null all children inside a display object container.
0 2510 posted 15 years ago by radykal
A JS function that put the focus in the form field associated to a label element whenever is clicked. The for atributte of the label element must match the id attribute of the associated form field. It takes no arguments. From book Dom Scripting by...
0 1689 posted 15 years ago by alberomo
Useful when using user-submitted URLs
0 1668 posted 15 years ago by Entherman
An additional method for the jQuery validation plugin to validate a german date (dd.mm.YYYY) based on DateITA method.
0 2590 posted 15 years ago by tuuul
I was working on a site that pulled in and republished a bunch of RSS feeds. Some contained duff images such as blank gifs that I needed to block so I wrote this function to compare the url of an image against a blacklist
0 2276 posted 15 years ago by paulo72
Add this code to the controller Set controller as the delegate of the all the UITextField s in the UIView
1 2732 posted 15 years ago by yasirmturk
JS Function that style sibling elements of a given tag. Arguments: tag of the element We want siblings to style and name of the class we want to add. It needs the class to be styled (using CSS). It uses getNextElement function and addClass functions....
0 1302 posted 15 years ago by alberomo
A JS function that makes bold the text of table rows ("tr" elements) when you "mouseover" them. It takes no arguments. From book Dom Scripting by Jeremy Keith.
0 1408 posted 15 years ago by alberomo
A JS function that stripes the tables ("table" elements) of a document. It takes no arguments. Add a new class ("odd") to the odd rows that needs to be styled using CSS. Use addClass function. From book Dom Scripting by Jeremy Keith.
0 1498 posted 15 years ago by alberomo
A JS function that returns the next element of a node. Argument: The node you want to know next element. From book Dom Scripting by Jeremy Keith.
0 1628 posted 15 years ago by alberomo
Instead of requiring the loop.php file in your custom themes you can use there two functions, placed in your functions.php file to not only automatically include it, but make a dead simple to filter sections out on a page by page basis negating the n...
0 1927 posted 15 years ago by FatFolderDesigner
1 ... 121 122 123 124 125 ... 552