Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery add option if not exist

var optionExists = ($('#columnsAvailable option[value=' + $(this).val() + ']').length > 0);

if(!optionExists)
{
    $('#columnsAvailable').append("<option value='"+$(this).val()+"'>"+$(this).text()+"</option>");
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: apollo server change port 
Javascript :: js countdown 
Javascript :: how to use jszip in node.js 
Javascript :: jquery ajax form submit example 
Javascript :: Javascript load at Window loading time 
Javascript :: window.cookies javascript 
Javascript :: function component in react 
Javascript :: check box jquery 
Javascript :: javascript change title 
Javascript :: set lodash 
Javascript :: convert inches to feet javascript 
Javascript :: js copy image to clipboard 
Javascript :: filter dates javascript 
Javascript :: document.queryselectorall extract all href element 
Javascript :: react using proptypes 
Javascript :: set value lookup javascript dynamics 365 
Javascript :: js push in object 
Javascript :: angular read config from json 
Javascript :: get selector with specific text puppeteer 
Javascript :: pass variable to partial view ejs 
Javascript :: useisfocused react navigation 
Javascript :: react bootstrap col not working 
Javascript :: jQuery hello world program 
Javascript :: javascript random 1 or 0 
Javascript :: how to import a json string from a file in typescript 
Javascript :: video mute and unmute 
Javascript :: how to disable link in react 
Javascript :: detect adblock javascript 
Javascript :: javascript math absolute 
Javascript :: Heroku H10-App Crashed Error 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =