Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
<html>
<head>
<meta charset="utf-8">
<title>FIRST</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<style>
.greenbox{
background-color:green;
color:white;
width:auto;
height:170px;
}
.bluebox{
background-color:blue;
color:white;
width:auto;
height:200px;
padding:10px;
}
.yellowbox{
background-color:yellow;
color:black;
width:auto;
height:100px;
}


li{
   font-size:2em;
   margin-bottom:5px;
   text-align:center;
   
}
#list .ui-selecting{
     background:#740da0;
}
#list .ui-selected{
    background:#953ebb;
    color: white;
}	 
</style>


</head>
<body>
<div class="greenbox ui-corner-all" id="helloman">
<p>hello man</p>
</div>
<div class="bluebox ui-corner-all" id="seshu">
<ul id="list">
<li class="ui-state-default">BMW</li>
<li class="ui-state-default">AUDI</li>
</ul>
</div>
<div class="yellowbox ui-corner-all" id="microsoft">
<p>puli</p>
</div>


<script>
 $(function(){
    	$("#seshu").selectable({
		 stop: function(){
		 $(".ui-selected").each(function(){
		 $("<p></p>").text($(this).text()).appendTo("#microsoft");
		 });
		  }   
		});	 
	
		
		
		
});
</script>	 
</body>
</html>


What I have tried:

In css ui-selecting and ui-selected classes are not working.can you guess the error
Posted
Updated 15-Mar-20 1:53am
v2
Comments
Richard MacCutchan 14-Mar-20 8:24am    
No, I give up. What's the answer?

1 solution

Use your browser console to inspect your page and find out the reason. Specifically, watch for the class applied to your list, and check that it corresponds to what you think it should.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900