Search
 
SCRIPT & CODE EXAMPLE
 

HTML

Select Options From List Select Box & Remove By Name

<!DOCTYPE html>
<html>
<head>
<div class="formi" data-type="category">
<div>
<select>
	<option value="0">select an option</option>
	<option value="1">sami lore</option>
	<option value="2">value 2</option>
	<option value="3">luminu dore</option>
	<option value="4">value 4</option>
</select>
</div>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(".formi[data-type='category'] select").on('click',function(){
	var list = [];
	$(".formi[data-type='category'] select option").each(function()
	{
		const item = $(this).text();
		const indexOf = item.indexOf('value');
		if (indexOf == -1){
			var thisVal = $(this).val();
			$(this).remove();
		}
	});
});

</script>
</head>
<body>

<div id="div1"><h2>Let jQuery AJAX Change This Text</h2></div>

<button>Get External Content</button>

</body>
</html>
Comment

PREVIOUS NEXT
Code Example
Html :: how to hide youtube watermark from embedded video :2021 
Html :: inject modal to page through extension 
Html :: can we manipulate the html elements 
Html :: html unicode audio 
Html :: enter more than one function in onclick event js 
Html :: download file from link html 
Html :: How to start an html 
Html :: adding images to html 
Html :: how to add a paragraph in html 
Html :: get checkbox value in div TAG 
Html :: pythnon dialog box 
Html :: how to edit html in wordpress 
Html :: input type file pattern attribute in html 
Html :: how to align a section center in html 
Css :: make text unselectable css 
Css :: input type date remove calendar icon 
Css :: css underline color 
Css :: css visibility transition 
Css :: show max word with css 
Css :: journalctl last 100 lines 
Css :: how to remove background color in css 
Css :: transfrom rotate 
Css :: li remove dot css 
Css :: tailwind nowrap 
Css :: keep background image fixed during scroll using css 
Css :: Change png to white using CSS 
Css :: css reset 
Css :: center text css 
Css :: customize highlight color website 
Css :: css selector not checked input label 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =