Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Words! Words! Words! (Shakespeare)

Per Thykjaer Jensen (PETJ) asathoor

:octocat:
Words! Words! Words! (Shakespeare)
View GitHub Profile
View README.md

Improved Smooth Scroll

The sample in this codepen hides the obvious. If you want to use it, a variable in the function must be silenced, or rather commented out:

// var target = document.querySelector(".last");

If the line remains, the function will allways have .last as it's target ... (sic).

After this small revision you can use the function, like this:

@asathoor
asathoor / README.md
Last active Nov 24, 2020
LIst images on SD cards (yeah: cardS)
View README.md

Carolus Count Files

Idea to a service: List the number of files in a directory named DSC1A*, DSC2A* etc. by a loop. Sometimes, however, the number of files and the filenames may not be in order. To check that try something along these lined:

ls -l | tail -n1 # n = the number of files to be shown
View eksempel.html
<style>
/* jeg lægger lige styles her ... så er en fil nok.
Du skal selvfølgelig have dine styles i en separat fil ... */
/* flexbox layout */
.kvalitet {
display: flex;
justify-content: space-between;
}
View myIssue.css
/* css Zen Garden default style v1.02 */
/* css released under Creative Commons License - http://creativecommons.org/licenses/by-nc-sa/1.0/ */
/* This file based on 'Tranquille' by Dave Shea */
/* You may use this file as a foundation for any new work, but you may find it easier to start from scratch. */
/* Not all elements are defined in this file, so you'll most likely want to refer to the xhtml as well. */
/* Your images should be linked as if the CSS file sits in the same folder as the images. ie. no paths. */
@asathoor
asathoor / formNext.html
Created Oct 21, 2019
A form with a next option (jQuery)
View formNext.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
View README.md
View completedTemplate.php
<?php
/**
* Template Name: Bootstrap Three Widgets Pg
*/
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
View README.md
View jqueryClassSelect
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){ // dom load check
// hat click detector
$("#hat").click(function(){
$('#evilla').toggle();
@asathoor
asathoor / README.md
Last active Feb 18, 2019
Twentytwendy - jquery plugin.
View README.md

Twentytwenty

Husk at inkludere disse script via jeres js/ directory (se linje 34 - 35):

    <!-- HUSK: disse filer skal ligge i js/ directoryet -->
    <script src="js/jquery.event.move.js"></script>
    <script src="js/jquery.twentytwenty.js"></script>