2
jQuerifyブックマークレットと同じ方法でtablesorterプラグインを使用したいと思います。JQuerifyのようなブックマークレットでJQueryプラグインを使用できますか
私はこれを自分自身でやっていかなければなりませんか、それともどこかで利用できますか?
jQuerifyブックマークレットと同じ方法でtablesorterプラグインを使用したいと思います。JQuerifyのようなブックマークレットでJQueryプラグインを使用できますか
私はこれを自分自身でやっていかなければなりませんか、それともどこかで利用できますか?
置きこれはあなたのブックマークレットのコードの開始時:
var s=window.document.createElement('script'); s.setAttribute('src','http://code.jquery.com/jquery-latest.min.js'); window.document.body.appendChild(s);
これは、基本的にはjQueryライブラリを含んでいます。
編集:これは個人的な使い方であれば、コンピュータにjQueryのローカルコピーを保存し、そこにスクリプトの保存先を指定することができます。許可なく別のサーバーのリソースを使用することは実際には考えていません。
Edit2:申し訳ありませんが、私はあなたの質問を誤解しました。ここにコードが変更されました:
javascript:(function(){
var s=window.document.createElement('script');
s.setAttribute('src','http://code.jquery.com/jquery-latest.min.js');
window.document.body.appendChild(s);
var s2=window.document.createElement('script');
s2.setAttribute('src','http://tablesorter.com/jquery.tablesorter.min.js');
window.document.body.appendChild(s2);
$('table').tablesorter();
})();
私はそれを読みやすくするために別の行に分割しました。ここに凝縮されたバージョンです:
javascript:(function(){var s=window.document.createElement('script');s.setAttribute('src','http://code.jquery.com/jquery-latest.min.js');window.document.body.appendChild(s);var s2=window.document.createElement('script');s2.setAttribute('src','http://tablesorter.com/jquery.tablesorter.min.js');window.document.body.appendChild(s2);$('table').tablesorter();})();
私はすでにjQueryライブラリ用JQuerifyを使用しています、私はプラグインを使用したいと思います - tablesorter – john
は、私はあなたが何をしたいかを実行するために私の解決策を編集しました。 –
nice、ありがとうsudo work。ブックマークレットでjquery-uiの可用性を試してみよう –