skip to Main Content

Cannot Obtain text from 'Selected' Class Using Jquery

I am trying to get the text of an option value in a <select> component. I am using the jQuery plugin 'selectric'. The following returns an empty string instead of Grid. const option = $('.selected').text() console.log(option) <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/[email protected]/public/jquery.selectric.min.js"></script>…

VIEW QUESTION
Back To Top
Search