Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var customerTypeFields = [];
- customerTypeFields['Individual'] = ['First Name(s)', 'Last Name', 'Date of Birth'];
- customerTypeFields['Limited Company'] = ['Name', 'Company Number'];
- customerTypeFields['Partnership'] = ['Name', 'Company Number'];
- $('#customer-type-selector').chosen().change( function() {
- var visibleFields = customerTypeFields[$(this).children("option[value='" + $(this).attr('value') + "']").text()];
- console.log(visibleFields);
- $.each(visibleFields, function(i, field) {
- $('#customer-features').find('input[data-feature-type=' + field + ']').parent().parent().show();
- });
- });
- Uncaught Error: Syntax error, unrecognized expression: input[data-feature-type=First (s)]
- (...) .find('input[data-feature-type="' + field + '"]') (...)
Add Comment
Please, Sign In to add comment