Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function () {
- $('input[type=text], select').each(function () {
- var checkbox = $('#operator_' + this.id + '_enabled');
- if (checkbox.length > 0) {
- this.disabled = !checkbox.prop('checked');
- checkbox.change(function () {
- var inputId = this.id.replace('_enabled', '').replace('operator_', '');
- var item = document.getElementById(inputId);
- item.disabled = !$(this).prop('checked');
- });
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement