タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

JavaScriptとxpathとpluginに関するasiamothのブックマーク (1)

  • JavaScript-XPath を jQuery で - dogmap.jp

    id:amachang がリリースした JavaScript-XPath が、かなり良さげ。 JavaScript-XPath の検索結果を jQuery オブジェクトにして、利用できると便利そうなので、以下のようなコードを書いてみた。 (function(jQuery){ jQuery.xpath = function(selector, context){ context = context || jQuery(document); var r, res=[]; context.each(function() { r = document.evaluate(selector, this, null, 7, null); for(var node_no=0; node_no<r.snapshotLength; node_no++){ res.push(r.snapshotItem(nod

    asiamoth
    asiamoth 2007/11/15
    今が旬のスクリプトを、jQueryのプラグインに。/空気読まないで言うと、なんでわざわざjQueryにXPathの機能を(さらに)付与するのか、わからない。/ネイティブに実装しているブラウザだと速い、ということかな?
  • 1