I am facing a challenge where I have a collection of buttons enclosed in a div
that I want to resemble a dropdown:
<div id = "group">
<label> Group: </ label>
<div value =" 1hour "> 1h < / div>
<div value =" 2hour "> 2h < / div>
<div value = "3 hour" > 3h < / div>
< / div>
I am attempting to convert the above into:
<label> Group < / label>
<select>
& lt;option value = "1hour" & gt; 1h & lt; / option>
& lt;option value= "2hour" & gt; 2h & lt; /option>
& lt;option value = "3hour" & gt; 3h & lt; /option>
< / select>
However, while changing the appearance of the aforementioned div
menu, I aim to maintain the JS code and ensure that it functions precisely as before post modification in appearance.
$(" div #group ").each(function(i, ele) {
$(ele).bind("click", function() {
drawChart(this);
});
});
drawChart: feature(){
//performs a specific task here;
}
Is there any way in CSS to alter the interface without modifying the existing code for the div? Any suggestions? Thanks!!