• Resolved darthyoda6

    (@darthyoda6)


    I sent this addition to my last message, but added it after you marked the problem as solved. I’ve just installed the 1.4.2 update that had the newer clear_on_hide code, but it still has the same main problem as before.

    I was playing around with your code, and I added a console.log($group.attr('id')); to get the id of the group it was being called on, and added a console.log($inputs);, and figured out that it was activating the if ($group.attr('data-clear_on_hide') !== undefined) { after the group was being hidden, so .not(':button, :submit, :reset, :hidden') will never find the inputs in the group because they’re already hidden. So either you need to move that function before you hide the inputs in the group, or change the code to .not(':button, :submit, :reset'). After the change, then everything clears correctly.

    Also, you could also change if ($group.attr('data-clear_on_hide') !== undefined) to if ($group.data('clear_on_hide') !== undefined), but that doesn’t change the functionality of the code.

    • This topic was modified 5 years, 7 months ago by darthyoda6.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    Thanks,

    I didn’t realize it because I always have show/hide – animations on when I’m testing the plugin. So the fields were still visible while the hide animation is going on.

    I changed the order of the code so now it should work okay. It should work in version 1.4.3. Thanks for your contribution!

    Thread Starter darthyoda6

    (@darthyoda6)

    Thanks, seems to be working correctly now.

    Plugin Author Jules Colle

    (@jules-colle)

    whew ?? finally ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘clear_on_hide still not working right after 1.4.2 update’ is closed to new replies.