2012-08-14から1日間の記事一覧

jQueryのセレクターを変数で複数使うとき

はじめに jQueryのセレクターを変数で、さらに複数(or)指定することがあったのでメモ的に。 var selector = new Array(); selector.push("#haseharu"); selector.push(".cheb"); selector.push("#otani"); $(selector.join(,)).text('Li:d tech!')