The Making Of FeedMalaya

promo-logo

FeedMalaya is a social blog aggregator that pull out the best content from Malaysian bloggers was launched on June 7th, 2009 developed by Bat InfoMalaya and myself.

[Click here to read more...]

Unobstructive Hover on Table Using jQuery

Here a simple usage of hover on table compatible with all modern browser with a little help from jQuery.

jQuery(function($) {
	$("table tbody tr").hover(function() {
		$(this).addClass("hover");
	}, function() {
		$(this).removeClass("hover");
	});
});

As for the Stylesheet, you can add

table tbody tr { background: #fff; }
table tbody tr.hover { background: #fafafa; }

FizzBuzz Challenge Revisited

Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.

For this round as similar to before, I’m going to use Savvy.UI and jQuery. Code provided after the jump.

[Click here to read more...]

Live Form Validation for jQuery and Savvy.UI

Live Form Validation for jQuery and Savvy.UI is actually an extend of the Js.ext.validate module explained earlier in our Form Validation with jQuery and Savvy.UI tutorial. All core module under Savvy.UI use a customize JavaScript Inheritance method using Js.create which allow us to extends any core module to suite our requirement, which we would like to share with you in a moment.

[Click here to read more...]

jQuery.clone a little buggy in IE

If you are trying to clone a collection of DOM elements with a selected dropdown such as below:

<div id="sample-source">
	<select name="location">
		<option value="Kuala Lumpur">Kuala Lumpur</option>
		<option selected="selected" value="Petaling Jaya">Petaling Jaya</option>
		<option value="Bangsar">Bangsar</option>
	</select>
</div>

Followed by jQuery.clone() function below:

jQuery(function($) {
	$("#sample-source").clone(true).appendTo("#sample-cloned-1");
});

The cloned result may not inherit the selected option, however this issue can be solved by using jQuery.html() and append the value to #sample-clone-2 such as below:

jQuery(function($) {
	$($("#sample-source").html()).appendTo("#sample-cloned-2");
});