Home

Issue: 1758

jQuery code stops working after navigating the routes without rebooting the page

[issue link]

I have jQuery code that is responsible for the select. The problem is that if I switch over routes, then this select does not work. How can I fix this?

$(function () {
        $('.select_list_radio').on('click', function(){
            var current = $(this).find('label span').text();
            $(this).parents('.select_list_wrapper').find('.select_list_current .select_list_current_item').text(current);
            $(this).parents('.select_list_wrapper').removeClass('open');
            $(this).parents('.select_list_wrapper').find('.select_list').css('display', 'block');
        });
    })
This question is available on Nuxt.js community (#c1579)