Custom Right Click Context menu with jQuery

Sometimes it is required to show a custom context menu instead of the browser default one when right-clicking on the webpage or on a specific element.

By doing that it is possible to show a context menu according to the element and disable the default menu where necessary.

It is customizable according to the website design.

For implementing this I am using jQuery in this tutorial.

When right-clicking on the element then disable the browser default context menu and display the custom options.

Custom Right Click Context menu with jQuery

Read more

Dynamically add and remove element with jQuery

In this post, I show how you can add and remove new elements within your web page with jQuery.

There are two approaches to doing this –

  • Pre-made all elements
  • Dynamically create a new element

The first case is easy but you have to create all of the elements at once and hide them which is not required currently.

When you have to add an element you need to display the element one by one and for removing hide them.

Here the problem is – there are multiple unused elements are available which occupy space within your code and make it messy even if you don’t have needed some of the elements.

The second solution is better than the first where you can create and remove an element dynamically when you have to require.

In this tutorial, I am using the second solution.

Dynamically add and remove element with jQuery

Read more

Deleting Values from JavaScript Arrays: Methods and Examples

In JavaScript, dele­ting values from an array is a common task. There may be­ various scenarios where the­ removal of specific values be­comes necessary within a program. Fortunate­ly, JavaScript provides several built-in functions spe­cifically designed to efficie­ntly handle such situations.

When it comes to deleting values from an array, some of these inbuilt functions automatically rearrange the array index after deletion, while others solely remove the value without reordering the index. Understanding and utilizing these functions appropriately can significantly enhance your JavaScript coding skills.

In this tutorial, I will show you how to use these functions to efficiently delete values from an array, while maintaining the array’s integrity.

Let’s delve into JavaScript and learn how to delete values from an array using inbuilt functions.

Deleting Values from JavaScript Arrays: Methods and Examples

 

Read more