Skip to content

Instantly share code, notes, and snippets.

@three-inc
three-inc / heading_index.html
Created November 3, 2018 04:02
見出しはclassで管理
<section>
<h1 class="class_name">タイトル</h1>
<section>
<h2 class="class_name">タイトル</h2>
本文本文本文本文本文本文本文本文
本文本文本文本文本文本文本文本文本文
本文本文本文
</section>
</section>
@three-inc
three-inc / html5.1.html
Created November 3, 2018 03:22
HTML5.1
<section>
<h1>タイトル</h1>
<section>
<h2>タイトル</h2>
本文本文本文本文本文本文本文本文
本文本文本文本文本文本文本文本文本文
本文本文本文
</section>
</section>
@three-inc
three-inc / html5.0.html
Created November 3, 2018 03:21
HTML5.0
<section>
<h1>タイトル</h1>
<section>
<h1>タイトル</h1>
本文本文本文本文本文本文本文本文
本文本文本文本文本文本文本文本文本文
本文本文本文
</section>
</section>
@three-inc
three-inc / colorbox_ios.js
Last active November 3, 2018 03:23
colorbox.jsの背景を固定する(iOS対応)
$.colorbox({
...
fixed: true,
onOpen: function() {
var ycoord = $(window).scrollTop();
$('#colorbox').data('ycoord',ycoord);
ycoord = ycoord * -1;
$('body').css('position','fixed').css('left','0px').css('right','0px').css('top',ycoord + 'px');
},
onClosed: function() {
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>jQuery UI Tabs</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
@three-inc
three-inc / smoothscroll_not.js
Created July 3, 2018 01:49
スムーススクロール(除外するものをnotに)
$(function(){
$('a[href^="#"]').not('#tabs a').click(function(){
var speed = 500;
var href= $(this).attr("href");
var target = $(href == "#" || href == "" ? 'html' : href);
var position = target.offset().top;
$("html, body").animate({scrollTop:position}, speed, "swing");
return false;
});
});
@three-inc
three-inc / smoothscroll.js
Created July 3, 2018 01:36
スムーススクロール
$(function(){
$('a[href^="#"]').click(function(){
var speed = 500;
var href= $(this).attr("href");
var target = $(href == "#" || href == "" ? 'html' : href);
var position = target.offset().top;
$("html, body").animate({scrollTop:position}, speed, "swing");
return false;
});
});
@three-inc
three-inc / tabs.html
Last active July 3, 2018 01:24
jQueryで簡単にタブ設置
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>jQuery UI Tabs</title>
<!-- // jQueryの読み込み -->
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>