Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Using an image background for a photo allows all kinds of framing possibilities
0
1198
posted 12 years ago by COBOLdinosaur
A basic database made in Java. It resembles a mobile phone contacts activity in which user is prompted to introduce some data of new contacts.
0
2249
posted 12 years ago by eiger824
When using a CSS3 property that has vendor-prefixed versions available, I indent as usual with one tab and then use spaces to line up the properties on the colon. This allows for easy editing of all ‘sibling’ properties at once using [Sublime Tex...
1
2518
posted 12 years ago by Todd
The idea is to use this piece of code inside a virtualhost block
0
3313
posted 12 years ago by therobot
I have made a small jQuery snippet to demo the image swapping with attr() funciton. The demo uses 2 images with classes img1 and img2 respectively. On a click of a button, the images are swapped.
Basically the script stores “src†value into...
0
1268
posted 12 years ago by vijayrajesh
The following function loads all browser-cookies into an associative array with the cookie name as the index and the cookie value as the value
0
1124
posted 12 years ago by satie83
simple image rotation script; save as rotate.php in folder with images, call <img> to display
0
1509
posted 12 years ago by goddess
To set cookie use "cookie('name of your cookie','cookie data','expire date ')" it will set your cookie in the user browser .
To get the saved cookie use "cookie('name of your cookie')" it will give you the value of the cookie which you saved in the...
0
2181
posted 12 years ago by kameshsoft
By storing or by having the Iframe embed code as a variable, You can play the Youtube video on a click of a button or any other event. I have used “append†function of jQuery to append the IFrame code dynamically inside a DIV tag.
0
2207
posted 12 years ago by vijayrajesh
This useful function will convert a time in seconds to a time in years, months, weeks, days, and so on.
0
3220
posted 12 years ago by goo
Here is a set of functions that can be very useful: Give this script the url of a webpage, and it will save all images from this page on your server.
1
3329
posted 12 years ago by goo
Javascript which converts a Date object into an ISO 8601 formatted string - 'YYYY-MM-DDTHH:mm:ss.sssZ' - with a fallback for when the function 'toISOString' doesn't exist (e.g. IE 8 or less).
Usage:
var now = new Date;
console.log(now.toISOStrin...
0
3087
posted 12 years ago by davidwaterston
The thumbnails of Youtube videos are generally low in quality. Sometimes, the thumbnail is not enough to get the people attention. Here is a small code I have written that works as follows.
A custom thumbnail is displayed at the size of 560px wi...
0
1644
posted 12 years ago by vijayrajesh
Izvorni kod za web aplikaciju u kojoj smo implementirali validaciju jednokratne zaporke koju generira uređaj YubiKey.
0
912
posted 12 years ago by DSTG_Kwan
Removes $ from HTML form post, allows only number and decimal points. Has $ display in field but disappear when onfocus.
1
2331
posted 12 years ago by lromak
By using HAVING 'virtual_field' CONDITION we can add conditions to virtual fields that created at SELECT
0
3222
posted 12 years ago by tucq88
Web aplikacija generira sluÄajne registracijske oznake za grad Zagreb u odabranom formatu. Ispisuje se i broj mogućih razliÄitih registracijskih tablica za taj format.
0
2127
posted 12 years ago by DSTG_Kwan
Thanks Dan Gayle.
http://www.dangayle.com/import-feeds-wordpress-fetch-feed/
2
1719
posted 12 years ago by adambundy
in jquery mobile, .html() not refresh DOM. Execute this function after any DOM change.
0
1536
posted 12 years ago by goo
you can use this minified jQuery snippet to detect if your user is viewing using a mobile device.
1
1767
posted 12 years ago by goo
jQuery Mobile <head> template with needed css and js from CDN.
From http://http://jquerymobile.com/
0
1323
posted 12 years ago by goo