How to check if an element is visible in JavaScript

javascript check element visibility

In JavaScript, determining if a DOM element is visible is crucial for tasks like lazy-loading images, triggering animations, and enhancing accessibility. This article covers two main contexts for checking visibility: general visibility (whether the element is rendered and visible based on CSS properties) and viewport visibility (whether the element is visible within the user’s current view). We’ll also delve into the checkVisibility() method, including its options and limitations, and its browser support. Additionally, we’ll discuss how these techniques are applied in real-world components, such as carousels in popular UI frameworks.

Read More…

How to change opacity on hover in CSS

how to change opacity on hover css

Changing the opacity of images on hover is a common effect used in web design to create dynamic and interactive user interfaces. This article will walk you through the process of using the opacity property in CSS to achieve this effect.

Read More…

CoreUI PRO v5.2.13 for Angular 18.1

CoreUI PRO v5.2.13 for Angular 18.1

We are happy to announce CoreUI PRO v5.2.13 for Angular 18.1 available as of August 9, 2024. This update includes ng add schematics support, along with an update to Angular 18.1, enhancements for development and user experience, as well as fixes and improvements for stability and performance of the CoreUI components library for Angular.

Read More…

CoreUI v5.2.13 for Angular 18.1

CoreUI v5.2.13 for Angular 18.1

We are happy to announce that CoreUI v5.2.13 for Angular 18.1 is available as of August 9, 2024. This update includes ng add schematics support, along with an update to Angular 18.1, enhancements for development and user experience, as well as fixes and improvements for stability and performance of the CoreUI components library for Angular.

Read More…

How to dynamically add, remove, and toggle CSS classes in React.js

how to add remove toggler css class dynamically in react

Managing CSS classes dynamically in a React application is a common requirement, especially when it comes to creating interactive components. This article will guide you through various techniques to add, remove, and toggle CSS classes in React.

Read More…

CoreUI PRO v5.3.1

CoreUI PRO v5.3.1

We are pleased to announce the release of CoreUI PRO v5.3.1. This update addresses several key fixes and includes updates to critical dependencies, enhancing the stability and performance of the CoreUI PRO library.

Read More…

CoreUI v5.1.1

CoreUI v5.1.1

We are pleased to announce the release of CoreUI v5.1.1. This update addresses several key fixes and includes updates to critical dependencies, enhancing the stability and performance of the CoreUI library.

Read More…

How to loop through a 2D array in JavaScript

javascript how to loop through a 2 dimensional array

In JavaScript, a two-dimensional (2D) array is an array of arrays. It’s often used to store data in a tabular form. Traversing these arrays efficiently is crucial for many software development tasks. This article covers various methods to loop through a 2D array in JavaScript, offering examples to demonstrate each technique.

Read More…

CoreUI for React v5.3.0

CoreUI for React v5.3.0

We are excited to announce the release of CoreUI for React v5.3.0. This update introduces new features, important refactors, and dependency updates to enhance the functionality and performance of the CoreUI library.

Read More…

CoreUI PRO for React v5.4.0

CoreUI PRO for React v5.4.0

We are thrilled to announce the release of CoreUI PRO for React v5.4.0. This update introduces new features, important refactors, and dependency updates to enhance the functionality and performance of the CoreUI PRO library.

Read More…
Subscribe to our newsletter
Get early information about new products, product updates and blog posts.