05 Sep, 2012

My favourite HTML5 Features

Posted in: Snippets,xHTML

1. Geolocation 2. onLine 3. Audio and Video 4. Local Storage 5. History Geolocation Geolocation API is usually used together with Google Maps to show the current location of the device. Where would you use it? Geolocation is an essential feature for applications that needs to know information about the device’s current location such as [...]

Continue reading My favourite HTML5 Features

If you wish to disable wpadminbar in WordPress 3.1+ for a specific theme, just add the following line of code into functions.php file of your theme. No plugin installation required. add_action( ‘show_admin_bar’, ‘__return_false’ );

Continue reading Disable wpadminbar in WordPress (no plugin)

Comments Off

The following snippet of code will display a google map with user’s default location on jQuery mobile page if location services is enabled. Otherwise, it will use predefined lat and long values to create the map. The code uses jQuery mobile pagecreate event. A little info on jQuery mobile pagecreate event: pagecreate Triggered when the [...]

Continue reading Display a location-aware google map on page load with jQuery mobile

Comments Off

For iPhone / iPad (iOS) Prerequsites – Install ChildBrowser Phonegap plugin – Copy FBConnectExample/FBConnect.js into your www folder and include it in your HTML file – Read and follow the instructions from How to post to the Facebook wall in an iPhone app with phonegap, FaceBook Connect and ChildBrother plugin by MosaCrea The Javascript(jQuery) code: [...]

Continue reading How to ‘Post on Facebook Wall’ on iPhone and Android using PhoneGap plugins

After developing a few mobile websites in the past few months, I notice that I am reusing certain Javascript code in every project. Followings are the 10 Useful Javascript Snippets that I use for mobile sites. Note that some snippets require jQuery mobile framework. 1. Add class name “iPhone” or “Android” to body element if [...]

Continue reading 10 Useful Javascript Snippets for your mobile websites

Comments Off

jQuery Mobile is a framework for mobile web apps and mobile websites with an aim to provide a unified user interface system across many mobile device platforms such iPhone, BlackBerry, Android and Windows Mobile. The framework is built on top of one of the most popular Javascript frameworks, jQuery. Followings are some of the most [...]

Continue reading Top 10 jQuery Mobile Code Snippets that you need to know

The following Javascript snippets are sourced from snipplr, a Social Snippet Repository. They are written in pure Javascript lanaguage, without using any Javascript framework like jQuery, MooTools, Dojo, etc. 1. Email Validation Source function checkMail(email){ var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if (filter.test(email)) { return true; } return false; } 2. Toogle Checkboxes Source <script type="text/javascript"> function [...]

Continue reading 10 most useful Javascript snippets from snipplr

01 Sep, 2010

10 Useful jQuery Snippets

Posted in: Snippets

Following are 10 Useful jQuery snippets for any website. To use these snippets, you must include jQuery library in your page first and then add the snippets inside DOM ready function as follow: $(document).ready(function() { // add your snippets here }); 1. Display Warning Message for IE 6 Users if ( (jQuery.browser.msie) && (parseInt(jQuery.browser.version) < [...]

Continue reading 10 Useful jQuery Snippets

The following Javascript will clear default text value in input boxes when you click on them. To trigger the Javascript, you’ll need to specify both title and value attributes and set class of the input field to “text”. jQuery library is required for this to work. Javascript $(‘.text’).focus(function () { if ($(this).val() == $(this).attr(“title”)) { [...]

Continue reading Clear default text in input boxes on click with jQuery

I needed a script that copies a text (in my case, coupon code) onto clipboard and then open the web address associated with the coupon in a new window for my Coupons for Webmasters page. For the clipboard copying, I’m using ZeroClipboard script written by Joseph Huckaby. ZeroClipboard is a free and open source library [...]

Continue reading Click to copy and open site script

Profile PicHello! Welcome to Web development blog! My name is Ei Sabai and on this blog, I write about web development, mobile app development, latest web technologies and the likes. Read more about me or have a look at some of the tips & resources I've written.
Subscribe to our newsletter to receive tips, resources and special offers related to web development & design.
We do NOT spam.
Your name:  
Your email:  

Tips & Resources

Tips & Resources
WordPress Web Hosting
Recommended web hosting providers for WordPress 3.0
iPhone Native App Development
Important steps into iPhone app development for beginners
iPhone Web App Development
Tips for iPhone web app development
Coupons for Web Developers
Get discounts on web hosting, domain names, templates, etc
10 Useful jQuery Snippets
Easy-to-use jQuery snippets for any website
HTML Email Newsletter
Step-by-step tutorial on how to code an HTML email newsletter
  • bluehost Hosting $6.95/month
  • Joomla Templates