Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • jQuery Tutorial
  • jQuery Selectors
  • jQuery Events
  • jQuery Effects
  • jQuery Traversing
  • jQuery HTML & CSS
  • jQuery AJAX
  • jQuery Properties
  • jQuery Examples
  • jQuery Interview Questions
  • jQuery Plugins
  • jQuery Cheat Sheet
  • jQuery UI
  • jQuery Mobile
  • jQWidgets
  • Easy UI
  • Web Technology
Open In App
Next Article:
jQuery DrawSVG Plugin
Next article icon

jQuery Image ProgressBars Plugin

Last Updated : 13 Jul, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

In this article, we will learn how to implement image ProgressBar feature using the jQuery Image ProgressBar plugin.

Note: Please download the jQuery Image ProgressBar plugin in the working folder and include the required files in the head section of your HTML code.

<link href=”progressbar.css” rel=”stylesheet” type=”text/css”/>
<script src=”jquery-3.3.1.min.js”></script> <script src=”jquery.progressbar.js”></script>

Example: The following example demonstrates the basic functionality of Image ProgressBar plugin using jQuery createProgress() and getRandomNumber() functions. These functions make use of the plugin's SetPercentage() method for setting the percentage complete. For getting random numbers, JavaScript's Math.ceil() and Math.floor() are used. The background image along with the image selected for the progress bar is set. The plugin's option backgroundOpacity is also set in the jQuery part of the code.

html
<!DOCTYPE html> <html>  <head>     <title>jQuery Image Progress bars</title>     <style>         html {             font-family: "Helvetica Neue",                 Arial, sans-serif;              background-color: #e6e6e6;         }     </style>      <link rel="stylesheet"            type="text/css"            href="progressbar.css">     <script type="text/javascript"              src="jquery-3.3.1.min.js">     </script>     <script type="text/javascript"              src="jquery.progressbar.js">     </script> </head>  <body>     <h2>jQuery Image Progressbar</h2>     <div id="imageDivID">     </div>      <script type="text/javascript">         $(document).ready(function () {             let myimage = $("#imageDivID").progressBar({                 imageUrl: 'images/gfg2.jpg',                 backgroundImageUrl: 'images/geeksimage.png',                 imageHeight: 280,                 imageWidth: 300,                 backgroundOpacity: 0.5             });              createProgress(myimage, 0);          });          function createProgress(             imageProgressBar, currentVal) {             let increment = getRandomNumber(0, 3);             let newVal = currentVal + increment;             if (newVal > 100) newVal = 100;             if (currentVal == 100) newVal = 0;             imageProgressBar.SetPercentage(newVal);             setTimeout(function () {                 createProgress(imageProgressBar, newVal);             }, 100);         }          function getRandomNumber(minVal, maxVal) {             min = Math.ceil(minVal);             max = Math.floor(maxVal);             return Math.floor(Math.random()                 * (max - min + 1)) + min;         }     </script> </body>  </html> 

Output:


Next Article
jQuery DrawSVG Plugin

G

geetanjali16
Improve
Article Tags :
  • Web Technologies
  • JQuery
  • jQuery-Plugin

Similar Reads

    jQuery Page Piling Plugin
    jQuery pagePiling.js plug-in is a rich feature available for programmers for piling more than one layout section, one over the other, and accessing each page by URL or mouse scrolling or side bullets navigation. This feature provides all type of smooth vertical, horizontal, and side navigations to t
    5 min read
    jQuery | Flickerplate Plugin
    jQuery provides Flickerplate plugin that helps our programmers to create sliders for websites that can cycle through a list of background images along with dot navigation feature and animated arrows. The plugin consists of many more libraries that are responsible for touch detections and events such
    5 min read
    jQuery Multiscroll Plugin
    jQuery provides multiscroll.js plugin which helps programmers to create split web pages along with divided multiple vertical scrolling panels.Note: Please download the jQuery multiscroll plugin to your working folder and include the required files in the head section of your code as shown below. Dow
    3 min read
    jQuery RowGrid Plugin
    jQuery provides a very simple, user-friendly and responsive rowGrid plugin that helps programmers to display images in a straight row. It is very lightweighted and supports infinite scrolling feature. Real examples of rowGrid are Google+ images or Google image search that appears in a straight row g
    4 min read
    jQuery Alertify Plugin
    jQuery framework provides alertify.js plugin that provides pre-designed customizable notification system along with interactive browser dialogs. This extensible and themeable plugin is very useful for developers providing an optimized version of alert messages with stacking up to feature. This small
    5 min read
    jQuery Image ProgressBars Plugin
    In this article, we will learn how to implement image ProgressBar feature using the jQuery Image ProgressBar plugin. Note: Please download the jQuery Image ProgressBar plugin in the working folder and include the required files in the head section of your HTML code. <link href=”progressbar.css” r
    2 min read
    jQuery DrawSVG Plugin
    SVG or Scalar Vector Graphics is Extended Markup Language-based graphics supporting 2 dimensional animations of images enhancing interactiveness. The specifications of SVG are open standards by World Wide Web Consortium defined in XML text files. These files can be changed or created with any drawin
    4 min read
    jQuery Tagsort Plugin
    jQuery provides Tagsort plugin that is used for displaying tags or filter elements based on different tags in a DOM. The plugin takes data-attributes of HTML page structure and dynamically creates user-friendly tags used for filtering elements. The filtration of elements are done in many ways that a
    9 min read
    jQuery Logos Distort Plugin
    The jQuery provides LogosDistort plugin which helps in creating or animating a parallax environment for 3D scenes in the user browser. It uses full-page matrix3D perspective logos distortions for transforming base on mouse movement. You have to download the required files in the working folder so th
    4 min read
    jQuery Filer Plugin
    jQuery provides a quick jQuery Filer uploader plugin for easy implementation of uploading the files. It provides features like instant uploading of files, file append, file removal, multiple selections, drag and drop support along with other file validations.Download the required files to include it
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences