Drupal 7. I have a radio button set. When one of the items is selected I would like it to set the node add title to some string. This is as far as I got, but I get the error: "TypeError: '[object Object]' is not a function (evaluating '$("#edit-field-i-need-help-with-und-printer-ink")')"
(function ($) {
Drupal.behaviors.cgps_helpdesk_misc = {
attach: function (context, settings) {
$("#edit-field-i-need-help-with-und-printer-ink").change(function ($) {
if ($("#edit-field-i-need-help-with-und-printer-ink").attr("checked")) {
alert('Handler for .change() called.');
$('#edit-title').val($('#edit-title').val() + 'bla bla bla');
}
});
}
};
}(jQuery));