Skip to content

Instantly share code, notes, and snippets.

Words! Words! Words! (Shakespeare)

Per Thykjaer Jensen (PETJ) asathoor

Words! Words! Words! (Shakespeare)
View GitHub Profile

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 /
Last active Nov 24, 2020
LIst images on SD cards (yeah: cardS)

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
/* 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 - */
/* 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 / formNext.html
Created Oct 21, 2019
A form with a next option (jQuery)
View formNext.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
View completedTemplate.php
* Template Name: Bootstrap Three Widgets Pg
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
View jqueryClassSelect
<!DOCTYPE html>
<script src=""></script>
$(document).ready(function(){ // dom load check
// hat click detector
asathoor /
Last active Feb 18, 2019
Twentytwendy - jquery plugin.


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>