Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The code falls over when implemented in a select within an Ajax enabled view, or indeed probably any Ajax enabled element. This is all due to the initialiser for the JS
Change the Document.ready to something like this: Drupal.behaviors.loadJqueryDropdown = function(context) {
Then when Ajax elements called Drupal.AttachBehaviors it will actually LOAD THE JS again, instead of just dropping it like a dead pigeon..
Cheers
Chris