I have two click events as follows:
$($('[id^="tab"]')).live('click', function() {
alert($(this).attr("id"));
});
$($('[id^="home"]')).live('click', function() {
alert($(this).attr("id"));
});
Is it possible to combine this into one click even as the only difference is "home" and "tab"?
Sure, simply divide them by
,
:http://jsfiddle.net/yUYVh/3/