Animated Configurable Skill Bar Plugin with jQuery - Skills Bar

File Size: 33.9 KB
Views Total: 15731
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Animated Configurable Skill Bar Plugin with jQuery - Skills Bar

Skills bar is a lightweight yet fully configurable jQuery plugin that creates animated horizontal bar indicators to showcase your skill / experience set in percentage. The plugin uses jQuery's animate() method to animate the skill bars so it works great on most web browsers.

See also:

Basic usage:

1. Add the jQuery Skills bar plugin along with jQuery JavaScript library to your webpage.

<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="js/skill.bars.jquery.js"></script>

2. Create a set of skill bars and set the percentage value using data-percent attribute.

<div class="skillbar" data-percent="98">
  <span class="skillbar-title" style="background: #d35400;">HTML5</span>
  <p class="skillbar-bar" style="background: #e67e22;"></p>
  <span class="skill-bar-percent"></span>
</div>
<!-- End Skill Bar -->

<div class="skillbar" data-percent="99">
  <span class="skillbar-title" style="background: #2980b9;">CSS3</span>
  <p class="skillbar-bar" style="background: #3498db;"></p>
  <span class="skill-bar-percent"></span>
</div>
<!-- End Skill Bar -->

<div class="skillbar" data-percent="95">
  <span class="skillbar-title" style="background: #2c3e50;">jQuery</span>
  <p class="skillbar-bar" style="background: #2c3e50;"></p>
  <span class="skill-bar-percent"></span>
</div>
<!-- End Skill Bar -->

<div class="skillbar" data-percent="70">
  <span class="skillbar-title" style="background: #46465e;">PHP</span>
  <p class="skillbar-bar" style="background: #5a68a5;"></p>
  <span class="skill-bar-percent"></span>
</div>
<!-- End Skill Bar -->

3. Initialize the plugin to generate animated skill bars with default settings.

$('.skillbar').skillBars({
  // options here
});

4. Add your own CSS styles to the skill bars.

.skillbar {
  position: relative;
  display: inline-block;
  margin: 15px 0;
  width: 100%;
  background: #eee;
  height: 35px;
  border-radius: 3px;
  width: 100%;
}

.skillbar-title {
  position: absolute;
  top: 0;
  left: 0;
  width: 110px;
  font-weight: bold;
  font-size: 13px;
  color: #ffffff;
  background: #6adcfa;
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
  background: rgba(0, 0, 0, 0.1);
  padding: 0 20px;
  height: 35px;
  line-height: 35px;
}

.skillbar-bar {
  height: 35px;
  width: 0px;
  background: #6adcfa;
  border-radius: 3px;
  display: inline-block;
}

.skill-bar-percent {
  position: absolute;
  right: 10px;
  top: 0;
  font-size: 11px;
  height: 35px;
  line-height: 35px;
  color: #ffffff;
  color: rgba(0, 0, 0, 0.4);
}

5. Config the skill bars with the following opitons.

$('.skillbar').skillBars({

  // number start
  from: 0,       

  // number end 
  to: false,      

  // animation speed
  speed: 1000,   

  // how often the element should be updated
  interval: 100,    

  // the number of decimal places to show
  decimals: 0,      

  // callback method for every time the element is updated,
  onUpdate: null,   

  // callback method for when the element finishes updating
  onComplete: null,   

  // CSS classes
  classes:{
    skillBarBar : '.skillbar-bar',
    skillBarPercent : '.skill-bar-percent',
  }
  
});

This awesome jQuery plugin is developed by umarwebdeveloper. For more Advanced Usages, please check the demo page or visit the official website.