Press "Enter" to skip to content

Dev Bay - everything for programmers

Cookies notification bar – only with HTML, CSS and pure JavaScript – step by step

I will show in this article how to create cookies (or in general: terms and conditions) notification bar only with pute HTML, CSS and JavaScript, without any kind of library which would support us here. Of course you can find tens of well-working modules which will give you solution just like that. But there are many situations, that it is…

Front-end basics: #4 Tables columns the same or defined width + wrap long text

Tables are strange HTML elements. If we put CSS rule to whole table: width: 100%; then columns inside that will try to use space of whole table, sometimes it will fit the longest word in one column, sometimes it will just try to fit columns widths more or less proportional to the longest word in each column. In our example…

JavaScript: creating own callback functions

Many methods in JavaScript uses callback functions. Let’s consider e.g. Array “map” method. You can have a variable containing array like: const numbers = [9, 8, 7, 6, 5, 4] and you can chenge all it’s elements by running a “map” method with a callback function which will do the same operation on every element in array, like e.g. multiplying…

The easiest REST API with NodeJS + ExpressJS + TypeScript

I will show you in this article how to build totally the easiest REST API build with NodeJS with Express plugin with TypeScript in place. This may sound as hard task to do, but with this short tutorial you will get everything working in just a few easy steps. You will be able to proceed further on your own. What…

JavaScript: Detect AdBlock and show modal window, hide website content or show custom ads

If you are running a website, you must know how annoying are AdBlock users. You try to give the best possible content for your users for free and you want simply to earn some money by external advertising services like Google Adsense, but AdBlock users are constantly minimizing your incomes. So… JUST DETECT ADBLOCK! Sounds clever, doesn’t it? There are…