Topic: How to disable MDB markup and handling of radio buttons on a page.

bpgillett pro asked 6 years ago


Hi.  I'd like to use MDB for everything except for my forms that use radio selectors. I have a javascript listener that checks for anytime the user makes a radio selection, but this will not work with MDB because MDB hides the actual radio controls. My Code: $(document).ready(function() { $(‘input[type=radio]’).click(function(event) {…} I can not use the ids of the forms bc they're dynamically created, and I also need to listen for anytime that a radio is clicked on any form. Thank you in advance. Best, Brian

bpgillett pro answered 6 years ago


All good.  I'm using: $(document).on('change', 'input:radio[id^="answer_"]', function (event) {...}); to listen for anytime someone clicks on an radio with an id that starts with "answer_" (the naming scheme for these radio selector forms, i.e. answer_1, answer_2, etc.).  All works! Thanks, Brian

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags