How do I fix my broken jQuery change event?

I recently upgraded from jQuery 1.11.1 to jQuery 3.0.0 and now  a simple change on a couple of radio buttons no longer works. How can I get this back to working as it should?

    <script type="text/javascript">
       jQuery(document).ready(function () {
            j$('#cmdCreateNewEvent').prop('disabled', 'disabled');

            $('#rdoSameDonor').change(function () {
                EnableCreateButton();
            });
            $('#rdoDifferentDonor').change(function () {
                EnableCreateButton();
            });
        });

        function EnableCreateButton() {
            $('#cmdCreateNewEvent').removeProp('disabled');
        }
    </script>

Open in new window

LVL 1
Michael SterlingWeb Applications DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
Line: 3
j$('#cmdCreateNewEvent').prop('disabled', 'disabled');
^
What's this

Open in new window

After you have fixed that check your console for errors.
This code works with 3.4.1
<input type="radio" name="radio1" id="rdoSameDonor"> rdoSameDonor
<input type="radio" name="radio1" id="rdoDifferentDonor"> rdoDifferentDonor

Open in new window

jQuery
<script>
jQuery(document).ready(function () {
  $('#cmdCreateNewEvent').prop('disabled', 'disabled');
  $('#rdoSameDonor').change(function () {
    EnableCreateButton();
  });
  $('#rdoDifferentDonor').change(function () {
    EnableCreateButton();
  });
});

function EnableCreateButton() {
  alert('Fired');
}
</script>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Michael SterlingWeb Applications DeveloperAuthor Commented:
Julian - I got it figured out and that was a mistake...
Michael SterlingWeb Applications DeveloperAuthor Commented:
This was my solution. Not sure if this was the best/better way to do this but it is working. I'll leave this open to "better" suggestions for a few days before I close it. It would be good to know other ways to make this work. Thanks in advance!

    <script type="text/javascript">
        jQuery(document).ready(function () {
            $('#cmdCreateNewEvent').prop('disabled', 'disabled');

            $('#rdoSameDonor').on('click', function () {
                if (this.checked)
                    EnableCreateButton();
            });
            $('#rdoDifferentDonor').on('click', function () {
                if (this.checked)
                    EnableCreateButton();
            });
        });

        function EnableCreateButton() {
            $('#cmdCreateNewEvent').attr("disabled", false);
        }
    </script>

Open in new window

Get Blueprints for Increased Customer Retention

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

Julian HansenCommented:
You don't need to do that .change() should work.

Here is a working sample http://www.marcorpsa.com/ee/t3660.html
Michael SterlingWeb Applications DeveloperAuthor Commented:
Ok. I'll keep trying ".change()". For some reason though, its not enabling my button so that I can click it and I don't know why. Maybe it works for the version of jQuery that you're using but for 3.0.0 its not working. Not sure why.
Julian HansenCommented:
Do you have a link?
Michael SterlingWeb Applications DeveloperAuthor Commented:
I don't but I got it working.
Michael SterlingWeb Applications DeveloperAuthor Commented:
Thanks for your help.
Julian HansenCommented:
You are welcome.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.