Event delegation and event propagation in JavaScript

1. Event propagation Event propagation is the way events travel through the DOM tree. There are two directions of propagation: Example of event propagation Let’s assume we have the following HTML: And we add two event listeners: If you click on #child, you will see in the console: This happens because the event bubbles (it […]

Read more

CSS background image and color

In CSS, the background property is used very often. It lets you add background colors, images, gradients, and many other visual effects. By using background-image together with background-color, you can create nice-looking sections, banners, hero images, layouts, and full website designs. Background-color This is the simplest and most commonly used type of background. The background […]

Read more

What are data- attributes in HTML and what are they used for?

Data- attributes in HTML – what are they and what are they used for? When writing a website in HTML, we often need to store some extra information about an element. This can be information that is not visible to the user but is useful in JavaScript or CSS – for example, it can be […]

Read more

Object destructuring in JavaScript

Object destructuring is a syntax in JavaScript that allows you to extract values from objects and assign them to variables in a straightforward way. This enables easy access to data stored in objects without having to reference the object’s properties each time.

Read more

Midnight Commander (MC) and color customization in linux

Midnight Commander (MC) is a free and open-source file manager that provides a text-based user interface. It is available on numerous Unix-like systems, including Linux and macOS. It uses a two-panel layout, allowing users to view the contents of two directories simultaneously. This design makes it easy to move or copy files between directories. Due […]

Read more

Multiple sliders on one page with simple jQuery slider

If you’re reading this post then you probably have problem with slider, that don’t work correctly if occurs several times on the same page. I have a solution to you – simple jQuery slider, that you can put on page as many times, as you want and it will be work as it should.

Read more

WordPress custom admin page

When you write your own plugin, you often want to add dedicated page for its settings. In this post I will show you how to do this.

Read more

How to use ajax in WordPress – on frontend and admin side

Ajax ( Asynchronous JavaScript and XML ) allows us do action in asynchronous way – without page reloading. It is very useful and has affect on better user experience. We can for example add, hide or delete some content from site and there’s no need to reload whole page.

Read more