This is a migrated thread and some comments may be shown as answers.

how to target dropdownlist for jquery event

2 Answers 115 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Doug asked on 27 Jun 2016, 04:07 PM
I have added to my form a change to my save button if any (various) inputs are changed.
$(document).ready(function () {
    $("input,select,textarea").change(function () {
        $("#<%=btnSaveDataFull.clientid %>").addClass('SkinPulgin_button_update');
    });
});


this works for the textboxes, textareas ,comboboxes
but not dropdownlists changes.

2 Answers, 1 is accepted

Sort by
0
Doug
Top achievements
Rank 1
answered on 28 Jun 2016, 01:23 PM
looks like these are just spans so I will add an OnClientSelectedIndexChanged for each drop down to just call the button save data to change colors.
0
Magdalena
Telerik team
answered on 29 Jun 2016, 07:26 AM
Hello Doug,

DropDownList does not contains any input, select or textarea. If the OnClientSelectedIndexChanged event does not meet your expectations, you can bind the ".rddlFakeInput" element to the DOMSubtreeModified event.
$('.rddlFakeInput').bind("DOMSubtreeModified", function () {
    console.log("changed");
});


Regards,
Magdalena
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
DropDownList
Asked by
Doug
Top achievements
Rank 1
Answers by
Doug
Top achievements
Rank 1
Magdalena
Telerik team
Share this question
or