First I thought that this would not be a Drupal specific problem, but jQuery specific solutions didn't solved it. I hope you have some advices.
I have a form with lots of fieldsets. To find the right fieldset I've implemented a textfield as a filter with jQuery to show just the fieldset I want to see:
$(document).ready(function(){ $(document).on('keyup','#textfield-filter', {} ,function(e){ if($(this).val()) { var val = $(this).val() $('#myform fieldset').each(function() { if($(this).attr('id').indexOf(val) >= 0){ $(this).show(); } else { $(this).hide(); } }); } else { $('#myform fieldset').each(function() { $(this).show(); }); } }); }); That works on page load. But I also have a Drop Down Select Menu to select a complete different set of fieldsets. With a click on a button the entiry page is refreshed with the set of fieldsets, which was selected in the Drop Down Menu. But unfortunately, the 'keyup' event of my textfield is not fired after refreshing the page with the button. As I said, I thought about a jQuery specific problem first, but the only solution I found was to attach the event handler for now and for the future, what I already did with $(document).on('keyup','#textfield-filter', {} ,function(e).
The form is rendered with the Form API. If necessary I can -of cause- give you my php code.
I would welcome very advice.
Many thanks!
Daniel