<script>
$(document).ready(function () {
$('form').attr('action', function (i, val) {
return val + '#section';
});
});
</script>
<script>
$(document).ready(function () {
$('form').attr('action', function (i, val) {
return val + '#section';
});
});
</script>
WordPress 2023.11.6
<?php wp_head(); ?> 下に入れる
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
jQuery 2023.10.29
$(window).scroll(function() {
var height = $(window).height();
if ($(window).scrollTop() > height) {
$('header').addClass('is-show');
} else {
$('header').removeClass('is-show');
}
});
WordPress 2023.10.3
thanksページを作りたくないのでパラメータを付ける
functions.php
function my_mwform_after_send( $Data ) {
if ( $Data->get_form_key() === 'mw-wp-form-xxx' ) {
$id = $Data->get( 'id' ); $url = get_permalink($id);
wp_redirect($url.'?q=thanks');
exit;
}
}
add_action( 'mwform_after_send_mw-wp-form-xxx', 'my_mwform_after_send' );
未分類 2023.7.4
$(function(){
var sliderShow = $('.slider');
sliderShow.slick({
arrows:true,
});
$('.tab').click(function () {
sliderShow.slick('setPosition');
});
});
HTML 2023.6.21
SimpleBarで解決
WordPress 2023.5.23
functions.php
/* ===============================================
# timthumb
=============================================== */
define('THEME_DIR', get_template_directory_uri());
/* Timthumb CropCropimg */
function thumbCrop($img='', $w=false, $h=false , $zc=1, $a=false, $cc=false ){
if($h)
$h = "&h=$h";
else
$h = "";
if($w)
$w = "&w=$w";
else
$w = "";
if($a)
$a = "&a=$a";
else
$a = "";
if($cc)
$cc = "&cc=$cc";
else
$cc = "";
$img = str_replace(get_bloginfo('url'), '', $img);
$image_url = str_replace("http://","http://",THEME_DIR) . "/timthumb/timthumb.php?src=" . $img . $h . $w. "&zc=".$zc .$a .$cc;
return $image_url;
}
HTML
HTML
<div class="scroll">
<a href="#about">
SCROLL
</a>
</div>
<!-- /.scroll -->
SCSS
.scroll {
bottom: 180px;
font-family: 'Volkhov', serif;
font-size: 13px;
letter-spacing: .2em;
position: absolute;
right: 80px;
-ms-writing-mode: tb-rl;
writing-mode: vertical-rl;
text-orientation: sideways;
a {
&:before,
&:after {
content: "";
display: block;
height: 150px;
width: 1px;
position: absolute;
right: 50%;
top: 120%;
transform-origin: top;
background-color: rgba(0, 0, 0, 0.5);
}
&:before {
background-color: rgba(0, 0, 0, 0.1);
}
&:after {
transform: scaleY(0);
animation: anim-scroll 2.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
}
}
@keyframes anim-scroll {
0% {
transform: scaleY(0)
}
35% {
transform: scaleY(1);
transform-origin: top
}
40% {
transform-origin: bottom
}
50% {
transform: scaleY(1)
}
85% {
transform: scaleY(0);
transform-origin: bottom
}
100% {
transform-origin: top
}
}
WordPress 2023.5.15
タイムゾーンで東京を選択するとうまくいかないことがありました。
UTF+9に変更したらうまくいきました。
<script>
jQuery(function($) {
if ($('.error')[0] || $('.mw_wp_form_confirm')[0] || $('.mw_wp_form_complete')[0]) {
$("body").addClass("mw_wp_form_dn");
}
const email01 = $('input:text[name="email"]').val();
if (typeof email01 !== "undefined") {
$("body").addClass("mw_wp_form_dn");
}
});
</script>