gte IE 8 and firefox, chrome, safari, opera latest version
<link rel="stylesheet" href="style.css" media="all">
/** | |
* カスタム投稿タイプ example | |
*/ | |
add_action('init', 'create_example'); | |
function create_example(){ | |
$labels = array( | |
'name' => 'サンプル', | |
'singular_name' => 'サンプル', | |
'add_new' => 'サンプルを追加', | |
'add_new_item' => '新しいサンプルを追加', |
<?php | |
// カスタムタクソノミーを登録 | |
register_taxonomy( | |
'example_tax', // カスタムタクソノミー名 | |
'example', // 投稿タイプの指定 | |
array( | |
'hierarchical' => true, // trueの場合はカテゴリーのように表示 | |
'update_count_callback' => '_update_post_term_count', | |
'label' => '分類', | |
'singular_label' => '分類', |
// カスタム投稿タイプ | |
function create_example(){ | |
$labels = array( | |
'name' => 'サンプル', | |
'singular_name' => 'サンプル', | |
'add_new' => 'サンプルを追加', | |
'add_new_item' => '新しいサンプルを追加', | |
'edit_item' => 'サンプルを編集', | |
'new_item' => '新しいサンプル', | |
'view_item' => 'サンプルを編集', |
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ajax sample used jQuery</title> | |
<style> | |
#response { | |
margin: 1em 0; | |
padding: .5em; | |
background: #C6DDAA; |
// ファイルの権限(パーミッション)を表示する | |
<?php | |
$data = array( | |
'file' => 'sample.txt', | |
); | |
if (file_exists($data['file'])) { | |
$data['exists'] = 'exists'; | |
} else { | |
$data['exists'] = 'no exists'; |
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>インラインフレームのテスト</title> | |
</head> | |
<body> | |
<iframe width="200" id="frame" height="150" src="sample.html"> | |
テスト | |
</iframe> |
/* | |
* 名前空間を提供する。トップレベルオブジェクト | |
* | |
* <p>Christian Johansen(著),長尾高弘(翻訳)『テスト駆動JavaScript』ASCII | |
* 下記サイトで配布されているスクリプトを変更。</p> | |
* <p>http://tddjs.com/</p> | |
*/ | |
function Common() {} | |
/** | |
* 名前空間を設定・管理する。 |
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>event test sample</title> | |
<meta name="description" content=""> | |
<meta name="keywords" content=""> | |
<link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" media="all"> | |
<script src="http://code.jquery.com/qunit/git/qunit.js"></script> | |
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script> |
jQuery(function($) { | |
// 選択範囲取得は下記ライブラリを利用している。 | |
// jQuery.selection | |
// http://madapaja.github.com/jquery.selection/ | |
// テキストエリア(#input)の文字列を取得し | |
// 改行を<br>へ置換しDIV要素(#output)へ表示する。 | |
var outputText = $('#input').val(); | |
outputText = outputText.replace(/\n/g, '<br>'); | |
$('#output').html(outputText); |