Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Radio buttons freeze after some "onClick" js events

bissounet free asked 3 years ago


Hello, I have a problem when I associate a group of radio buttons with click events. I am using instructions like: $ (document) .ready (function () { $ ('# radio_opt1'). on ("click", function () {... js events}) )} The system works great at first, then gets slower and slower after 2 or 3 clicks, then my site freezes. This problem reminds me of the one I encountered recently with the chaining of 3 successive dependent selects. Thank you in advance for your help !


bissounet free commented 3 years ago

Guess what ... there is a mdb select which updates according to the checked radio button ... I tried the "data-stop-refresh='true'" instruction at the end of the onClick js event (after the select update), then it doesn't freeze anymore, but the select ins't updated.


bissounet free commented 3 years ago

OK, problem solved :-)))) Again with mdb select, in addition to data-stop-refresh='true' in select css , I had to empty the select first in js( $('#updated_select').empty() ) and re-declare it update ( $("#updated_select").materialSelect() ). Hoping that this adventure will help some other beginners like me ;-)


bissounet free commented 3 years ago

erratum : "...and re-declare it AFTER update..."



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.19.2
  • Device: PC
  • Browser: all
  • OS: W10
  • Provided sample code: No
  • Provided link: No