This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" /> | |
<%= javascript_include_tag "application" %> | |
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> | |
<script> | |
$(document).bind("mobileinit", function(){ | |
$.mobile.ajaxLinksEnabled = false; // Ajax を使用したページ遷移を無効にする | |
$.mobile.ajaxFormsEnabled = false; // Ajax を使用したフォーム遷移を無効にする |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//イベントを発生させるオブジェクトを作成 | |
var events = require("events"); | |
var emitter = new events.EventEmitter(); | |
//発生させる関数を定義 | |
var sampleListener = function(arg1){ | |
console.log("arg1"); | |
} | |
//イベント("occurrence")を定義して、関数をむすびつける。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>jQueryのロード</title> | |
<!-- jQueryを、Google Libraries APIで読み取る。最新版の1.8.3を読み取る。 --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script> | |
<!-- もし、Google Libraries APIが何らかの理由で読み取れなかった場合の処理。 --> | |
window.jQuery || | |
document.write('<script src="jquery-ui.min.js"></script>'); |
NewerOlder