Here is the fix:
$.fn.dateofbirth = function() {
return this.each(function() {
$(this).children('select').change(function(){
var cont = $(this).parent();
var day = $("select[name='Day']", cont).val();
var month = $("select[name='Month']", cont).val();
var year = $("select[name='Year']", cont).val();
var fullDate = day + " / " + month + " / " + year;
$(this).parent().find('.result').val(fullDate);
});
});
};
$('td.dob').dateofbirth();
You problem here is that on the "onChange" event, you're selecting the values using: $("select[name='Day']").val(); and that is only selecting the FIRST day dropdown, that's why you always get the same value.
The fix consists on first getting the parent element of the element that originated the change event and then working with the dropdowns that are INSIDE that parent.
If you have questions about the core, let me know.
One more thing
This is what did the trick:
When selecting elements with jQuery, you can specify the container inside where to look for. That's what I did there, you have $(SELECTOR STRING, container_element)