hernansartorio / hernansartorio/jquery-nice-select

How can I set a value with Jquery ?

Open
#24 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
955
Forks
271
PR merge metrics
No merged PRs in 30d

Description

Hello , my friend , wonderful script . Congratulation .
I have a question , I am trying to change the value with the jquery , like this -

$(document).on('click', '.edit-item', function(event){
$("#myselect").val(1);
}

or
$(document).on('click', '.edit-item', function(event){
$('#myselect>option:eq(3)').prop('selected', true);
}

but is not changing , maybe has some script that has to tell the jquery to refresh , after on click .
Do you know what do I have to do to make it works ?
Thanks

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the provided jQuery change handlers against the jquery-nice-select plugin and inspect how the custom dropdown reflects the underlying select value. Done means setting #myselect programmatically causes the visible custom control to display the selected option.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.