Page 1 of 1

select component is undefined using jquery

Posted: Mon Apr 22, 2019 11:36 am
by kanukawa
$('#select').data('select') is undefined

$('#select') is found but after data('select') is undefined

Re: select component is undefined using jquery

Posted: Mon Apr 22, 2019 11:47 am
by olton
Show your select element code

Re: select component is undefined using jquery

Posted: Mon Apr 22, 2019 12:22 pm
by kanukawa
I'm working on VueJs

Template code

Code: Select all

<select id="select" data-role="select">
</select>
Javascript code

Code: Select all

mounted() {
    const select = $('#select').data('select')
    console.log(select) // undefined
}

Re: select component is undefined using jquery

Posted: Mon Apr 22, 2019 2:19 pm
by olton