2012年11月28日水曜日

jquery each continue


$.each(function()
{
    if ( flg ) {
        // continue に相当する
        return true;
    } else {
        // break に相当する
        return false;
    }
});

jQuery要素の存在チェック


if($("#elem")){}
if($("#elem").size()>0)
if($("#elem").length)
if($("#elem").get(0))
if($("#elem")!=null)

さくらエディタ矩形選択方法


Alt+ドラッグ
クリック位置からの矩形範囲選択ができます

2012年11月12日月曜日

jquery 重なった要素のonclickイベントとmouseoverイベント の中断


Use "event.stopPropagation()" to stop the events from bubbling upwards:
  jQuery('#menu li a').mouseover( function(evt) {
       evt.stopPropagation();
       return false;
  });
  jQuery('#menu li a').mouseout( function(evt) {
       evt.stopPropagation();
       return false;
  });
参考リンク