Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:33
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • May 10 09:13
    @bjorno43 banned @zhaokunhaoa
  • Apr 25 17:12
    @mstellaluna banned @cmal
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:09
    thecodingaviator commented #31179
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:07
    thecodingaviator commented #31182
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator commented #31190
  • Apr 01 18:05
    thecodingaviator commented #31157
  • Apr 01 18:04

    thecodingaviator on master

    remove A (#31157) (compare)

  • Apr 01 18:04
    thecodingaviator closed #31157
  • Apr 01 18:04
    thecodingaviator closed #33788
  • Apr 01 18:04
    thecodingaviator commented #33788
  • Apr 01 18:02
    thecodingaviator closed #31059
  • Apr 01 18:02
    thecodingaviator commented #31059
Adel
@AdelMahjoub
this one is the most active, after the main channel
Jason Luboff
@JLuboff
I can't stand the main channel
Adel
@AdelMahjoub
yeah hard to follow
Adel
@AdelMahjoub
@tiagocorreiaalmeida
$(document ).ready(function() {
  var progress = $(".progress");
  progress.each(function() {
    console.log($(this).attr("progress"))
  })
});
Tiago Correia
@tiagocorreiaalmeida
    var percentage = document.getElementsByClassName("progress")
    for(var i = 0; i<percentage.length; i++){
      $("."+percentage[i].getAttribute('class')).css("width",percentage[i].getAttribute('progress')+"%");
    }
shouldnt this work?
Adel
@AdelMahjoub
@tiagocorreiaalmeida what do you want to do ?
Tiago Correia
@tiagocorreiaalmeida
I have like 3 or 4 spans
and their width
will grow based
on a attribute
that called progress
so if progress 75 width of the div will be 75
Adel
@AdelMahjoub
@tiagocorreiaalmeida ah you want a progress bar based on theese value
Tiago Correia
@tiagocorreiaalmeida
yeah that's it
since I can use the width for it
I do .css width
Tiago Correia
@tiagocorreiaalmeida
@AdelMahjoub any idea?
Adel
@AdelMahjoub
@tiagocorreiaalmeida you want those same spans to get a width or you want a real progress bar ?
@tiagocorreiaalmeida first you need a height for those spans, span is an inline element,
@tiagocorreiaalmeida or set them to display block, in any case they need a height and a background color
Tiago Correia
@tiagocorreiaalmeida
that's all defined mate
I only need to pick the attribute progress
and set the width of each span to that the progress value
Adel
@AdelMahjoub
@tiagocorreiaalmeida idk if this fits what you need https://jsbin.com/jexehuxize/edit?html,css,js,output
@tiagocorreiaalmeida the width of each span is set equal to that progress value
Tiago Correia
@tiagocorreiaalmeida
exactly big thanks mate
Adel
@AdelMahjoub
@tiagocorreiaalmeida
/*
CSS
*/
.progress {
    height: 20px;
    width: 0;
    margin-bottom: 5px;
    background-color: brown;
    display: block;
    transition: width 1s;
  }
/*
JS
*/
window.addEventListener('DOMContentLoaded', function() {
  var progress = document.querySelectorAll('.progress');

  progress.forEach(function(element) {
    var percentage = element.getAttribute('progress')
    element.style.width = percentage + 'px';
  });
});
intcreate
@intcreate
How can i make the earth spin/rotate? https://jsfiddle.net/La3qbr0v/
Diego Mayer
@Chrono79
animated gif? http://jsfiddle.net/LwwfG/ <- but the earth doesn't rotate like that
Bryan Reese
@breese8009
thanks guys i solved
Randell Dawson
@RandellDawson
@intcreate - Close as you can get with that image -
https://jsfiddle.net/6y9bkLdr/
Jason Luboff
@JLuboff
@rmdawson71 The earth is flat?!
:joy:
Diego Mayer
@Chrono79
The anticonspirancy were right!
I'm selling these fine aluminium-foil hats btw
Randell Dawson
@RandellDawson
@JLuboff - That photo was taken in the 1600s by an alien.
Jason Luboff
@JLuboff
No wonder!
Jason Luboff
@JLuboff
Ugh... the igdb api is such a pain to work with
juni
@junipberry
hey guys, is it wrong for me to combine the conditionals like this.. How can I get it work in the same line?
function isEitherEvenOrAreBoth7(num1, num2) {
  if (num1%0 || num2%0) || (num1 && num2 = 7){
    console.log("true");
  } else {
    console.log("false");
  }
}
actually, its
console.log(true) and console.log(false)
Diego Mayer
@Chrono79
@junipberry = is used to assign, not to compare
use === or == instead
Jason Luboff
@JLuboff
As well as you would need num1 === 7 && num2 ===7
Diego Mayer
@Chrono79
and you should repeat the seven there too
Christopher McCormack
@cmccormack
@junipberry anything mod 0 will be NaN
You'll want to do num%2, and check if the result is === 0 for it to be true
juni
@junipberry
ahh right, ty @Chrono79 and ty @cmccormack
CamperBot
@camperbot
junipberry sends brownie points to @chrono79 and @cmccormack :sparkles: :thumbsup: :sparkles:
api offline