Front End Technology Articles

Page 639 of 652

Crop Canvas / Export HTML5 Canvas with certain width and height

Riya Kumari
Riya Kumari
Updated on 12-Oct-2022 2K+ Views

HTML5 canvas allows the users to draw or create 2D graphics in any web page. Suppose you want to crop a part of the canvas created on the web page and export it to any other area of the web page, then you can do it using javascript. For example, you have an image in the canvas and you want to export a part of image of dimension 400px * 260px. In this article, we will learn how to execute the above using few javascript codes. To learn further, let us first considering understanding what HTML5 Canvas is What is ...

Read More

Can I play the same sound more than once at the same time with HTML5?

Riya Kumari
Riya Kumari
Updated on 12-Oct-2022 2K+ Views

Suppose you want to make a quiz app. In it, if you click the wrong option, an audio will be played in the background saying “wrong answer”. But if you click two or more options simultaneously which are wrong, you won’t be able to hear the sound as many times wrong answer is clicked at the same time. So, how to resolve this issue. In this article, you will see if you can play the same sound more than once at the same time with HTML5 or not. The answer is Yes!!! There are two methods for doing so. Let ...

Read More

How to register a handler to be called when the Ajax request begins using jQuery?

Manav Sarkar
Manav Sarkar
Updated on 20-Jul-2022 592 Views

jQuery is a feature-rich JavaScript library. We can perform a lot of actions with the help of jQuery which would otherwise require writing large pieces of code. It makes DOM manipulation, event handling, animation, ajax, etc. very easy.In this tutorial, we will learn how to register a handler to be called when the first Ajax request begins using jQuery. Ajax requests are typically HTTP requests that are called by the browser for different tasks such as GET, POST, etc. So when the tasks are performed, we can register a handler using the ajaxStart() function of jQuery. This function is always ...

Read More

How to register a handler to be called when all Ajax requests completed using jQuery?

Manav Sarkar
Manav Sarkar
Updated on 20-Jul-2022 1K+ Views

In this tutorial, we will learn how to register a handler to be called when Ajax requests complete using jQuery. Ajax requests are typically HTTP requests that are called by the browser for different tasks such as GET, POST, etc. So when the tasks are performed, we can register a handler using the ajaxComplete() function of jQuery. This function is always triggered when the request is completed.SyntaxUse the following syntax to register a handler after every ajax request −$(document).ajaxComplete(function () {    console.log('Registered handler.') })Explanation − Suppose we have a GET request on an API. When the API returns a ...

Read More

How to check the lock state of a callback list using jQuery?

Manav Sarkar
Manav Sarkar
Updated on 20-Jul-2022 227 Views

In this tutorial, we will learn how to check the lock-state of a callback list using jQuery. The lock is a callback list in jQuery in the current state. We can toggle the lock state so that additional changes cannot be made unless required.SyntaxThe callbacks list is locked and checked as follows −// Get callbacks list at current state var callbacks = $.Callbacks() // Lock the callbacks list callbacks.lock() // Check callbacks is locked or not console.log(callbacks.locked())AlgorithmFirst we receive the callbacks list at the current state using the Callbacks() function.Then we lock it using the lock() function and ...

Read More

How to attach a function to be executed before an Ajax request is sent using jQuery?

Manav Sarkar
Manav Sarkar
Updated on 20-Jul-2022 2K+ Views

In this tutorial, we will learn How to attach a function to be executed before an Ajax request is sent using jQuery. Ajax requests are typically HTTP requests that are called by the browser for different tasks such as GET, POST, etc. So when the tasks are performed, we can register a handler using the ajaxSend() function of jQuery. This event is called by jQuery whenever an ajax request is to be made.SyntaxUse the following syntax to register a handler before an ajax request −$(document).ajaxSend(function () {    console.log('Triggered ajaxStart. Started Request') })We have an Ajax request. Before sending the ...

Read More

How to add the previous set of elements on the stack to the current set in jQuery?

Manav Sarkar
Manav Sarkar
Updated on 19-Jul-2022 336 Views

jQuery is a feature-rich JavaScript library. We can perform a lot of actions with the help of jQuery which would otherwise require writing large pieces of code. It makes DOM manipulation, event handling, animation, ajax, etc. very easy.In this tutorial, we will learn to add the previous set of elements on the stack to the current set. jQuery maintains an internal stack of the changes that are performed to the matched stack. When the DOM traversal functions or methods are called, the new elements are pushed into the stack. So to use previous stack elements, the addBack() method is called.SyntaxWe ...

Read More

5 common security breaches and How to defend against them

Samual Sam
Samual Sam
Updated on 09-May-2022 203 Views

Your website is one of your business’s most important tools. It draws new customers; informs current customers; gives you a portal to effectively communicate with the world; and helps shape the image of both you and your business.Each hiccup in your website’s operation can cause you headaches and cost you money. To keep things running smoothly, take a look at the following common security breaches and how to defend against them.DDoSThis isn’t DOS with a stutter. DDoS stands for distributed denial of service. This is when a team of malicious computers gang up on your website to flood your website ...

Read More

How to Create a Color Picker in ReactJS?

Mayank Agarwal
Mayank Agarwal
Updated on 25-Apr-2022 1K+ Views

In this article, we are going to explore how to create and use a Color Picker in ReactJS. A Color Picker can be defined as a graphical user interface widget that is usually found within some graphics software or used online to select/choose colors and sometimes to create new color themes as well.React is a free and open-source front-end JavaScript Library that is used for building user interfaces or UI components. It is maintained by Facebook and a community of individual contributors who keep it updated.ApproachWe can run through the following steps to create a color picker −First we would ...

Read More

ReactJS: How to Create a Pie Chart using Recharts?

Mayank Agarwal
Mayank Agarwal
Updated on 25-Apr-2022 8K+ Views

In this article, are going to explore the Rechart JS Library and implement it in a React application to watch how they are used. Rechart Libraries are specifically used for creating different types of charts over the React Application. Charts that can be build using this library are Line Charts, Bar Charts, Pie Charts, etc.In this tutorial we will be creating a Pie Chart using the library and a set of data entry points. Based upon this data the chart will be formed that will define the slices with the pie element. This will have the data property that will ...

Read More
Showing 6381–6390 of 6,519 articles
« Prev 1 637 638 639 640 641 652 Next »
Advertisements