1

リストを含むdivがあります。

そのCSS:

#ResultsText  
{  
  color: #696969;
  text-align: right;
  vertical-align: top;
}

JSファイルの場合:

$("li.ResultParagraph").mouseover(function () {
  $(this).addClass("ui-state-hover");
}).mouseout(function () {
  $(this).removeClass("ui-state-hover");
});

$('.ui-state-hover').css("font-weight", "normal");

それでも、ホバーテキストは太字で表示されます。
助言がありますか?

4

1 に答える 1

3

このようにする必要があります(または「太字」「通常」に切り替えます)

$("li.ResultParagraph").mouseover(function () {
    $(this).addClass("ui-state-hover").css("font-weight", "bold");
}).mouseout(function () {
    $(this).removeClass("ui-state-hover").css("font-weight", "normal");
});

デモ

于 2012-05-17T08:56:46.427 に答える