// Skillbars
// Author: Martin Emanuelsson
// http://www.emanuelzone.se
// Download free at http://jsfiddle.net/emanuelzone/rxq8daw7/
$(document).ready(function() {
$(".skill-btn-1").click(function(event) { // <-- Animate skills
event.preventDefault();
'use strict';
var div = $(".html"); // <-- Choose your skill to display
div.animate({
width: '90%', // <-- Set the percent of your skill for each column
opacity: '1'
}, 1000); // <-- Set the speed for each skill animation
var div = $(".css");
div.animate({
width: '85%',
opacity: '1'
}, 1400);
var div = $(".php");
div.animate({
width: '30%',
opacity: '1'
}, 1600);
var div = $(".javascript");
div.animate({
width: '50%',
opacity: '1'
}, 1800);
});
$(".skill-btn-2").click(function() { // <-- Reload skills
'use strict';
var div = $(".html");
div.animate({
width: '0%',
opacity: '1'
}, 1800);
var div = $(".css");
div.animate({
width: '0%',
opacity: '1'
}, 1600);
var div = $(".php");
div.animate({
width: '0%',
opacity: '1'
}, 1400);
var div = $(".javascript");
div.animate({
width: '0%',
opacity: '1'
}, 1000);
});
console.log('Skillbars is ready.'); // <-- Make sure it works in your browser
});
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.