Welcome To Snipplr
Everyone's Recent JavaScript Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
In a recent iphone webapp I developed, I needed to use safari's Local Database feature. The webapp needed to make a few SQL Queries while performing other actions.
The local database data transaction process makes it difficult to make queries and...
0
890
posted 13 years ago by cmndo
Automatically use jQuery to Open External Links in New Window (checking domain first).
3
1143
posted 13 years ago by mindshare
Resize iframe height. This means if the content of your iframe is longer than the iframe height, and the iframe doesn't have a scrollbar, you can resize the height of the iframe so the content is viewed.
0
748
posted 13 years ago by kodomonster
Often you supply a default value in a text field which you want to automatically clear when the user enters the field. This will do that operation and fill the field with a default value.
0
817
posted 13 years ago by jimbo
Clear a field on entry if the default text matches a supplied value. Generic to any field.
0
728
posted 13 years ago by jimbo
JavaScript
greaseMonkey - Ajout script personnelle sur vos pages - Add your owner javascript in your html\'s code
0
807
posted 13 years ago by nasso
Free JavaScript slideshow with thumbnail gallery, zoom-in-effect, zoom-out-effect and transparency-effect (opacity). Add as many pictures as you like. Each picture can be linked and commented. The thumbnail gallery can be displayed or hidden. True co...
0
1028
posted 13 years ago by fabulant
Most of spservices function can be ignored -- not specifically relevant to templating. Important code in that block is the array push.
0
693
posted 13 years ago by rumremix
http://blog.ramonlechuga.com/2010/10/20/checking-object-structure/
The Array
0
604
posted 13 years ago by ramonlechuga
I always find issue when we want to show date in different format i.e other than mysql default format. (YYYY-MM-DD) using jquery plugin this date format can be converted into any specified date format i.e indian,US,Europe from any html element
0
850
posted 13 years ago by pavanrulz
Using image to display page loading message count an extra dns request.
making moving text message with javascript increases performance of page loader
1
723
posted 13 years ago by pavanrulz
* Set your local path to the wordpress install, in my case was: "/blog/feed"
* Edit the var contain = make it set to the selector, in my case I'm populated a list tag <ul></ul>.
* Edit the var limit = 5; Set the amount of blog posts you want to dis...
1
1739
posted 13 years ago by crypticsoft
Note: replace "USERNAME" with your own twitter username.
This is using cycle plugin with easing which is applied after the tweets are populated.
1
1137
posted 13 years ago by crypticsoft
This simple script toggles element visiblity on a page based on a form field's current value.
0
922
posted 13 years ago by beneberle
given a url:
>`http://www.someurl.com/page.html?param1=foo¶m2=bar`
You can use map.param1 outside of the function such as:
>`$('#some_hidden_field').val(map.param1);`
0
623
posted 13 years ago by agdm
This is 3 lines of javascript code to tweetify plain text returned by Twitter API
Input : RT @TTintheCloud: How much are free #cloudcomputing trial offers from Google, Amazon and Microsoft actually WORTH? http://bit.ly/i4w4qa
Output : RT <a hre...
1
538
posted 13 years ago by naren1012
This is probably the first vertical JavaScript text ticker that sues tilted letters. Works with Internet Explorer 6x/7x/8x/9x, Firefox 3.6x, Opera 10.5x and Google Chrome 4x/5x/6x. Older Browsers show no ticker.
0
826
posted 13 years ago by fabulant
What's so special about this JavaScript slideshow? By moving your cursor all over the webpage you create a nice distortion effect on your images.
0
738
posted 13 years ago by fabulant
Also selects different sized header images for better image quality.
1
734
posted 13 years ago by HelloKit