次のコードを記述するより良い方法はありますか?
私は Aloha Editor を使用しており、私の jQuery では、編集可能なクラスを持つ要素はマウスオーバーで 3 ピクセルの破線の境界線を取得します。以下のコードは正常に動作しています。 " このコードを書くには:
$(function(){
$('[class^="editable"]').mouseover(function(){
$(this).css('border','3px dashed #a7a7a7');
});
$('[class^="editable"]').mouseout(function(){
$(this).css('border','0px dashed #ffffff');
});
});