我已經嘗試使用jquyer中的切換功能,但它不適用於多個LI,我嘗試使用可選功能不工作。需要在jquery中創建獨特的圖像可選功能
需要在jquery中創建獨特的圖像可選功能。我有很多李與內部圖像點擊圖像李會得到背景顏色。假設我點擊其他應該得到背景的圖像,其他的應該是默認的顏色,如開關選擇(單選按鈕)。
<ul><li class="ui-widget-content ui-corner-tr ui-draggable">
<fb:profile-pic height="32" width="32" linked="false" uid="557103888"
style="width: 32px; height: 32px;" class=" fb_profile_pic_rendered">
<img class="" style="width: 32px; height: 32px;" title="some name"
alt="some name" src="files/t557103228_5135.jpg">
</fb:profile-pic>
</li>
<li class="ui-widget-content ui-corner-tr ui-draggable">
<fb:profile-pic height="32" width="32" linked="false" uid="557103887"
style="width: 32px; height: 32px;" class=" fb_profile_pic_rendered">
<img class="" style="width: 32px; height: 32px;" title="some name"
alt="some name" src="files/t557103228_5135.jpg">
</fb:profile-pic>
</li>
<li class="ui-widget-content ui-corner-tr ui-draggable">
<fb:profile-pic height="32" width="32" linked="false" uid="557103886"
style="width: 32px; height: 32px;" class=" fb_profile_pic_rendered">
<img class="" style="width: 32px; height: 32px;" title="some name"
alt="some name" src="files/t557103228_5135.jpg">
</fb:profile-pic>
</li>
</ul>
請用背抽動(')僅用於內嵌代碼的元素。對於較長的代碼塊,可使用工具欄或CTRL + K鍵進行格式化。 – TheVillageIdiot 2010-08-30 06:25:33