Smooth Scroll with jQuery
$.fn.smoothscroll = function(offset, speed){
$(this).find('a').on('click', function(e){
e.preventDefault();
$('html,body').animate({scrollTop: $(this.hash).offset().top - offset}, speed);
});
};
$.fn.smoothscroll = function(offset, speed){
$(this).find('a').on('click', function(e){
e.preventDefault();
$('html,body').animate({scrollTop: $(this.hash).offset().top - offset}, speed);
});
};
$.fn.slideShow = function(fadeIn, fadeOut, duration){
var list = this;
var ID = setInterval(function(){
var visible = $(list).find('li:visible');
$(visible).fadeOut(fadeOut);
if($(visible).is(':last-child')){
$(list).find('li:first').fadeIn(fadeIn);
<?php
if(isset($_POST['submit'])){
$name = htmlspecialchars(stripslashes(trim($_POST['name'])));
$subject = htmlspecialchars(stripslashes(trim($_POST['subject'])));
$email = htmlspecialchars(stripslashes(trim($_POST['email'])));
$message = htmlspecialchars(stripslashes(trim($_POST['message'])));
if(!preg_match("/^[A-Za-z .'-]+$/", $name)){
instantSearch.html
or just copy the code.// Based on: https://stackoverflow.com/a/46814952/283851 | |
/** | |
* Create a Base64 Image URL, with rotation applied to compensate for EXIF orientation, if needed. | |
* | |
* Optionally resize to a smaller maximum width - to improve performance for larger image thumbnails. | |
*/ | |
export async function getImageUrl(file: File, maxWidth?: number) { | |
return readOrientation(file) | |
.then(orientation => applyRotation(file, orientation || 1, maxWidth || 999999)); |