Not Found The requested URL /blog/171 was not found on this server.
Not Found The requested URL /blog/171 was not found on this server.
GithubでjqueryでJSON-RPCするためのライブラリを公開していたのだが、何も考えずにPull Requestを取りこんでいたら全く動かない上に、読解不能かつバグの塊の様な状態になっていた。そろそろ自分で使いたくなったのでテストコードを書いてバグfixした。 テストする対象の性質上サーバーが必須になるので、今調査中のnode + expressで用意する事にした。 エンドポイントのコードはこんな風に書いてみた // RPC end point app.post('/rpc', function(req, res) { res.header('Content-Type', 'application/json'); var data = req.body, err = null, rpcMethod; if (!err && data.jsonrpc !== '2.0') { on
nodejitsu.com 2010.9.24のエントリ jsdom + jQuery in 5 lines with node.js node.jsでスクレイピング jsdom使うと取得したhtmlへDOMが使えるようになる 慣れ親しんだjqueryのセレクターapi使ってスクレイピング request/http-agentモジュール使って標準モジュール(=http)だけで書くよりもコードすっきり という内容のエントリ サンプルコード修正しないと動かない 以下斜め読んだ内容 スクレイピング たいていの言語がライブラリ色々用意されてる Ruby hpricot nokogiri Python beautiful-soup scrapy Perl pQuery PHP PHP DOM バグなくhtml/css/javascriptをハンドリングするのが難しい サーバーサイドjsにおけるスクレ
Appcelerator Developer Center – Use of Jquery windowとかdocumentオブジェクトがないせいで動かないので、空のオブジェクトを定義してやるという方法。 そんなやり方でいいのか。 jQuery 1.5だと上のやり方のままでは動かなかったのでちょっと修正して動いたのが以下のコード。 var window = {}; var document = { getElementById: function(){}, createComment: function(){}, documentElement: { insertBefore: function(){}, removeChild: function(){} }, createElement: function(e){ return obj = { innerHTML: "", append
Tips, techniques, and tutorials for the jQuery JavaScript library Editor's Note: This article originally appeared on danheberden.com. jQuery’s .animate() method, and the shorthand methods that use it, are fantastic tools to create animations. Creating animations that link together to achieve a particular effect, and do something specific at the end of the animation, can be a painful, messy task. L
この前ちょっと聞かれたので、メモっときます。 AjaxでJS含んだページをそのままロードするとDOMに追加した時点で実行しよるんで、それを回避するためのやつです。Autopagerizeを参考にしたと思います。 ついでに取得したHTMLの走査方法ですが、そのまま$(html)とかにすると、一番上のwrapperとかそういうdivだったりする要素が取得できないので、一旦divをかませておきます。 Ajax部分のソースコード $.ajax({ url: "hoge.html", type: "GET", success: function(html) { // 文字列で取得したデータを整理する html = html.replace(/
After playing with Deferred Objects for the first time yesterday, I've definitely gotten deferred on the brain. I've known about deferred objects for a long time and never really understood them; as such, I'm quite eager to wrap my head around exactly what it is that they are capable of doing. Last night, just after I posted my previous blog entry, it occurred to me that they might be useful for a
We've been building applications for more than 10 years, from small startups to the biggest brands and are recognized leaders in user experience design and JavaScript development. UX & Interface Design Make your app simple, easy to use, and beautiful. We can help you create a better user experience.
あなたにとって重要なトピックや同僚の最新情報を入手しましょう最新の洞察とトレンドに関する最新情報を即座に受け取りましょう。 継続的な学習のために、無料のリソースに手軽にアクセスしましょうミニブック、トランスクリプト付き動画、およびトレーニング教材。 記事を保存して、いつでも読むことができます記事をブックマークして、準備ができたらいつでも読めます。
こんにちは。さすがに見ないだろうと昔撮ったVHSビデオを、捨てるにあたってじっくり見てしまったminamiです。 小ネタです。HTMLファイルにちょっとした文言を読み込みたいときに重宝するjQuery.load()ですが、Chromeでうまく動かない場合があります。ちょっと引っ掛かってしまったので回避方法を調べました。 サンプルを作ってみた ものすごく簡単に以下のようなスクリプトを書きました。data.txtから読み込んだテキストを、div#txtPlaceに読み込みます。これをローカルでチェックしてみます。 function loadText() { var dataPath = "data.txt"; $("#txtPlace").load(dataPath); } firefox IE8 出ました。 出ません。なぜ!?参考ページを見ると、 Chrome: ローカルWebページからのア
All of jQuery UI's widgets and interactions are built from a simple, reusable base - the jQuery UI Widget Factory. It provides a flexible base for building complex, stateful plugins with a consistent API. It is designed not only for plugins that are part of jQuery UI, but for general consumption by developers who want to create object-oriented components without reinventing common infrastructure.
chromeとsafariを対象とする場合 if(!jQuery.support.checkOn){ alert('あなたがお使いのブラウザはChromeもしくはSafariっぽいです'); } if文の条件式の中で!をつけたので、checkOnがfalseであればこの条件文に該当します。該当するのはwebkitだけなので、これでchormeとsafariのみに振り分けたコードを記述できます。なお、Android標準ブラウザ、iPhone / iPad標準ブラウザといったスマートフォンも同じChromeとSafariなので、この条件に合致します。 FirefoxとOperaを対象とする場合 if(jQuery.support.checkOn && jQuery.support.noCloneEvent){ alert('あなたがお使いのブラウザはFirefoxもしくはOperaっぽいです'
2010/12/9 (木) p.m.11:01 Ben Alman » jQuery hashchange event 毎度毎度この手の記事の書き出しで書いておりますが、このページをブラウザで見るとAjaxで記事のデータを取ってきて云々。この場合、ページの遷移が発生しなかったり、通信量が少なくて済むなど利点も多いのですけど、欠点も少なくはないです。 中でも大きいのは各検索エンジンさんがインデックスしてくれない事で、これはほとんどのbotさんがJavaScriptに対応してませんし、普通のアクセスで送られてくるデータに記事の内容が含まれていないので仕方がありません。 この件に関してはGoogleさんが対応を表明しておりまして、若干面倒くさい仕組みを用意しなければなりませんが一応対応は可能です。詳しくは、Getting Started - Making AJAX Applications Cr
d="M21.99 12.055C21.99 6.49775 17.5122 2 11.995 2C6.47776 2 2 6.49775 2 12.055C2 17.0725 5.65817 21.2304 10.4358 21.99V14.9635H7.89705V12.055H10.4358V9.83608C10.4358 7.31734 11.925 5.92804 14.2139 5.92804C15.3033 5.92804 16.4528 6.12794 16.4528 6.12794V8.6067H15.1934C13.954 8.6067 13.5642 9.38631 13.5642 10.1759V12.065H16.3328L15.8931 14.9735H13.5642V22C18.3418 21.2504 22 17.0825 22 12.065L21.99 1
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く