我在下拉样式选择框中有一个值列表,例如
<select id="places">
<option>Italy</option>
<option>France</option>
<option>Germany</option>
<option>Spain</option>
</select>
我的页面上的 div 中也有相同的值列表,例如
<div>
<span>Italy</span>
<span>France</span>
<span>Germany</span>
<span>Spain</span>
</div>
Using JQuery, I want to have it so - when a value in the dropdown is selected, the equivalent option in the div is briefly highlighted.
我一直在努力使用 jQuery 高亮插件,但我相信更快的方法可能是使用 JjQuery UI 的高亮类。作为菜鸟提前道歉:)