Sort a list of divs regarding of they have a specific Class

10. October 2019

Hover another element

27. May 2019

Check what browser

22. May 2019

Redirect CF7 submit to another page

12. April 2019

Angular 2 nice to know

19. March 2019

Remember anything with the .spec after we don’t edit.

Vue, nice to know!

4. March 2019

jQuery nice to know

25. February 2019

Function to disable right click on WooCommerce product gallery

25. February 2019

Disable right-click

25. February 2019

Nice JS function :-)

17. February 2019

Function to create a movement of some item while scrolling

29. January 2019

For of loop to loop querySelectorAll

29. January 2019

Check if browser is IE7 or newer

17. January 2019

Async / Await

23. November 2018

Source

Add a text before some DOM element content

14. November 2018

 

Add JavaScript to wp-admin thought functions.php

2. November 2018

 

How to target the parent element

2. November 2018

HTML:

CSS:

jQuery:

 

React create-react-app – nice to know

13. October 2018

If you dont have create-react-app installed, run: npm install -g create-react-app (you only have to do this once on your mac)

To start a new project, cd into your folder and Run: create-react-app name-of-the-app

When that is finished, cd into your name-of-the-app folder and run: npm start

To install react icons: npm install save react icons

To make a ‘build’ out of your react app, stop the npm start command (option + c) and then run: npm run build now you have a new folder in you project, called build.

Making AJAX calls

2. October 2018

 

 

 

XMLHttpRequest

2. October 2018

This is the simplest usage of asynchronous XMLHttpRequest:

 

A standard function to read external files:

 

Example: using a timeout:

Also a way of use:

 

 

Canvas

25. September 2018

A basic example:

Examples of ‘command’:

 

 

 

Local Storage

22. September 2018

Live demo: https://thomasweb.studio/blueperu/

 

Shadow DOM

18. September 2018

Example

HTML:

JS:

Could also ‘grab’ the content from a <template> tag in the html document like this:

HTML:

JS:

 

 

Creating & removing HTML Elements (Nodes)

18. September 2018

Creating:

Removing:

 

 

 

Data Attributes

18. September 2018

Attribute Name
The data attribute name must be at least one character long and must be prefixed with ‘data-‘. It should not contain any uppercase letters.

Attribute Value
The attribute value can be any string.

Set & get attribute

Remove the data attribute:

Select elements:

Dataset:

 

 

Modifying the DOM

18. September 2018

Check if body has a certain class

24. July 2018

if you dont get anything, make sure the script is loading after the dom content.

 

Connect to mySQL with node.js

7. July 2018

 

Go back to where you came from

6. July 2018

 

Interval on function

5. July 2018

Make a function run every second:

 

Click outside modal

23. June 2018

 

Scroll effect JavaScript

9. June 2018

 

Fetching Api using vanilla JavaScript vs jQuery

28. May 2018

JavaScript:

jQuery:

 

How to manipulate the dom when scrolling

22. May 2018

Move element on page scroll

22. May 2018

Add touch events

22. May 2018