How to avoid jQuery namespace collisions using noConflict() function

Here I am going to tell you how you can avoid namespace collision on the DOM (Document Object Model) page. You can load jQuery either via CDN (Content Delivery Network) link or by downloading the jQuery from the website and put it into your application and include in your web page. So whatever method you follow to use the jQuery…

What are jQuery selectors and how to cache jQuery selectors to improve performance of your web page

Every time you use a selector the elements in Document Object Model (DOM) are searched to match your query or selector. Doing this kind of works too often or repeatedly will decrease the performance of your web page. If you refer to a specific selector too often or repeatedly you should consider to add it to a cache by assigning…

How To Load Local JSON File In Angular Application

JSON File JSON, i.e., JavaScript Object Notation is a lightweight format for interchanging data. It is based on a subset of JavaScript language. For example, this JSON data format is used in the webservice response. In old days webservices used XML for the primary data format but nowadays JSON, being lightweight, is becoming the preferred data format for exchanging data…

Docker Compose – Dockerizing Nodejs MySQL REST API CRUD Example

Dockerize NodeJs MySQL In this tutorial I am going to explain you how to use docker compose to dockerize your Nodejs MySQL REST API for CRUD operations. I am not going to tell you here how to build the REST CRUD application but you can always go back and check the detail tutorial on this here. I am only going…

NodeJS Express MySQL REST API CRUD Example

NodeJS CRUD App Here I am going to show you how to create REST API CRUD example using Nodejs Express and MySQL server. CRUD means Create, Read, Update and Delete operations which are performed through REST (Representational State Transfer) resources that works on http/https protocol. REST resources or APIs work on verbs, such as, GET, POST, PUT, DELETE, etc. So…

Allow only numeric values or digits in input field using React

Introduction In this example I am going to show you how to allow only numeric values or digits in input field using React JS. You may have a requirement where you only need to allow user digits or numeric values for the input field. If user inputs non-numeric values then either you show an error or you do not allow…

Allow only numeric values or digits in input field using Angular 10

In this tutorial I am going to show you how to allow users only input numeric values or digits. If users enter non-numeric value then we will show an error message. We can also completely prevent from entering non-numeric values. In this case, we need to accept only numbers for a textbox or input field instead of validating the value…

Autocomplete input using React

Introduction I am going to show you how to show auto complete suggestion when users search for something by typing in the input field. Autocomplete allows users to have other suggested strings or values displayed on typing of the relevant text in the input field. You have also seen when you start a search on Google or other search engines,…

Autocomplete input using Angular 9

Introduction I am going to show you how to give auto complete suggesstion when users search for something by typing in the input field. Autocomplete allows users to have other suggested strings or values displayed on typing of the relevant text in the input field. You have also seen when you start a search on Google or other search engines,…

Write random elements to div having class names from array using JavaScript

This is an example where I am going to show you how to write random elements to div having class names from array using JavaScript. Let’s consider we have multiple div tags on a web page and these div tags are created dynamically based on certain condition but you are not sure how many div tags will be created on…