Category: javascript

How to define EventListener for dynamic elements created in javascript

JavaScript makes it possible to execute functions when a certain event occurs within the DOM of our HTML. This event can be a “click” on a certain element (usually a button), the selection of an “option” within a combo, or even the loading (load) of the page.

In addition, another interesting and widely used feature in JavaScript is the possibility of creating elements (inputs, divs, links or any other type of HTML component) dynamically (also through events).

Continue lendo

Detect faces in images using jquery and facedetection

Hello people. All right with you?

In today’s post I teach you a really cool technique to do face recognition in images using jquery and the facedetection plugin . For the dinosaurs that used orkut, they know what I’m talking about. The social network provided (I don’t know if it still does) in users’ photos the possibility of marking the people photographed according to facial recognition.

Good. So come on. Hands on!To begin, let’s organize our file and directory structure as follows:

Continue lendo

Zoom images with JQzoom

Today I am going to show you how to implement an image zoom mechanism using JQuery with the JQzoom plugin . This technique consists of hovering the mouse over a certain area of ​​the image and an instant zoom of the selection appears beside it . This is widely used in e-commerce sites , as it is possible to check every detail of a product.

Before starting, it is important that we download the plugin files and organize our files and directories.To download the plugin and its files, click here . Unzip the files.

Continue lendo

Upload files with jquery and progress bar

Hey guys, how are you? In today’s post we will see a very cool way to put a nice file upload form with progress bar using AJAX (JQuery).

To follow the post, I recommend reading this post , which is where I approach a php function to upload files safely and simply. It is this function that I will use in today’s example.To get started, download JQuery and the JQuery.Form plugin . That done, our directory and file structure should look like this:

Continue lendo