 <p>I don't know if this will help with your problem, but in any case: jQuery is selector-based, so use classes instead of IDs (remove the #s everywhere and change the corresponding id/name attributes to class attributes) and your code will be much more generic, hence more reusable and maintainable.</p>