skip to Main Content

How do I remove an option from select list JQuery or Javascript?

My list can not have an option value like <option value="some_value"> Some text</option> My current code is <select id="select1"> <option>One</option> <option>Two</option> <option>Three</option> </select> <script src= "https://code.jquery.com/jquery-3.3.1.min.js"> </script> <script> $("option[value='Three']").remove() </script> I can not find a way to remove an option…

VIEW QUESTION

Get Caller in callback JQuery

is there any way to get $('#div') inside callback function? $('#div') changes var param = { a: 'haha' } $('#div').load('/foo.html', param, foo()) function foo() { var div = caller? // this variable should be "$('#div')[0]" }

VIEW QUESTION
Back To Top
Search