You can use .find()
of jQuery:
if($("#multi-select-wrapper").find(":contains('" + value + "')").length == 0) {
... // Add the element here.
}
Or if you prefer plain javascript you could use create the option values using this hack:
<option class="read@abc" value="read@abc">read@abc</option>
Then you can use:
var temp = document.getElementsByClassName(value)
if(temp.length == 0) {
... // Add the element here.
}
This is not recommended as class is not an a valid html attribute for option, though it will work for most browsers (hopefully): Fiddle