Javascript $.fn.checkAvailability = function() { $("#check-username").click(function() { if ( $(‘#username’).attr("value") != ”) { $(‘.loading’).show(); var username = $(‘#username’).val().toLowerCase(); $.get("check-username.php", { username:username } , function(data) { //if username is already taken (FALSE) if (data == 0) { $(‘.loading’).hide(); $(‘.error’).remove(); $(‘.available’).remove(); $(‘#check-username’).after(‘<span class="error"></span>’); $(‘.error’).text(‘Username is already taken.’); } else { $(‘.loading’).hide(); $(‘.error’).remove(); $(‘.available’).remove(); $(‘#check-username’).after(‘<span class="available"></span>’); $(‘span.available’).text(‘Username is [...]

Continue reading Check username availability using AJAX and jQuery

One of our latest projects at Anansi Web Development was to build a real estate website with a simple CMS. And I thought, rather than building something from the scratch, why don’t we use WordPress as a CMS and add necessary functionalities. And therefore, here are the steps involved in building a real estate website [...]

Continue reading Building a real estate website using WordPress

If you are hard-coding your navigation menu in WordPress rather than using wp_list_pages() template tag, you will need to add a class manually in order to highlight the current page it is on. <li<?php if (is_page(‘gallery’)) : echo ‘ class="current_page_item"’; endif; ?>><a href="gallery/">Gallery</a></li> Note: wp_list_pages() template tag automatically add current_page_item class to the <li> element [...]

Continue reading Highlight the current page link in WordPress

Problem in IE8: The upper half of the <fieldset> border goes missing. This problem has been discussed here and shown here. HTML: <form action="login.php" method="post" id="login"> <fieldset> <legend>Login</legend> <label for="username" class="label">Username</label> <input type="text" name="username" id="username"/> <label for="password" class="label">Password</label> <input type="password" name="password" id="password" /> <input type="submit" name="submit" value="Login" /> </fieldset> </form> CSS: fieldset { border: 1px [...]

Continue reading Fieldset and Legend bug in IE8

Ever since finding out about WolframAlpha.com, I’ve been playing with it and I must say it’s pretty amazing and addictive. WolframAlpha(tm) is a new type of search engine – or what they call “computational knowledge engine”. Rather than trying to explain what it is and what it does in words, lets have a look at [...]

Continue reading A new type of search engine in town – WolframAlpha

Comments Off

11 May, 2009

Opacity in CSS

Posted in: CSS,Snippets,Tutorials

.transparency { background: #f4f4f4; opacity: 0.7; /* Modern Browsers, eg: Firefox, Safari, Opera, Chrome */ filter: alpha(opacity = 70); /* IE */ -moz-opacity: 0.7; /* Old Mozilla, eg: Netscape */ -khtml-opacity: 0.7; /* Old Safari */ zoom: 1; /* Requires for IE if the element is not positioned relatively */ }

Continue reading Opacity in CSS

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