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
27 May, 2009
Building a real estate website using WordPress
Posted in: PHP,Web Development Blog,WordPress
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
.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
Hello! 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 

