I am developping my personnal website with Drupal 7. I would like to show a progressbar for each of my skills, but with differents values.
For exemple, I would like to see a progressbar under (or between if possible) a text, and (also if possible) with a percentage.
So I tried to use jQuery UI to solve my problem.
I want all my progressbars with a different value for each. Below, an exemple of the code of my website :
<?php
drupal_add_library('system', 'ui.accordion');
drupal_add_library('system', 'ui.progressbar');
drupal_add_js('jQuery(document).ready(function(){jQuery("#accordion").accordion();});', 'inline');
drupal_add_js('jQuery(document).ready(function() {jQuery(".progressbar").progressbar({ value: 37 });', 'inline');
?>
<div id="accordion">
<h3><a href="#">RÉSEAU</a></h3>
<div>
<p><h4>Windows Server 2008</h4>
<div class="progressbar" rel="50">50%</div>
<h4>Ubuntu Server</h4>
<div class="progressbar" rel="50">50%</div>
<h4>Virtualbox</h4>
<div class="progressbar" rel="90">90%</div>
</p>
</div>
But it does not work.
To solve that problem, I tried that kind of code found on that website, but I does not work for me, when I include it in drupal like that :
<?php
drupal_add_js('jQuery("div.progressbar").each (function () {var element = this;jQuery(element).progressbar({value: parseInt(jQuery(element).attr("rel"))});});', 'inline');
?>
<div class="progressbar" rel="90"></div>
Perhaps, I am in wrong, but any answer would be so great. Thank you in advance. :)