You can get the id from this.priorities.id assuming you set one in your html.
Aug 17, 2016
9
Level 2
How do I get the DOM Object of a v-model?
Hi, I apologize if this has been covered, it seems like basic thing, but I am having a really hard time finding anything about this on the vuejs documentation or on here.
I have assigned a select input a v-model attribute:
<select v-model="priorities">
In my Vue code, I need to check the value, and depending on what it is, I need to run a jquery plugin on that select input.
if (this.priorities.length < 1) {
// $(whatever-the-dom-object-is).plugin()
}
So in my vue code, I have the v-model variable. How do I get the DOM Object it is attached to to run the jquery plugin on?
Thanks in advance for any advice!
Please or to participate in this conversation.