Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Bikal Khawas
@bikalkhawas
:smile:
Sorin Ruse
@sorinr
@bwongcodes use background: rgba(0,0,0,.5); instead of opacity: 0.5
bwongcodes
@bwongcodes
Thankyou @sorinr
CamperBot
@camperbot
:star2: 1138 | @sorinr |http://www.freecodecamp.com/sorinr
bwongcodes sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
Sorin Ruse
@sorinr
@bwongcodes welcome
Muhammad Hasham
@MohammadHasham
var key = document.querySelector("audio[data-key=${x}]");
why is this not working my html is
<audio data-key="65" src="E:\Web Development\Javascript 30\Drumkit Challenge\boom.wav"></audio>
@sorinr
anyone there?
Clyde Lobo
@oppiniated
@MohammadHasham is x a variable?
Muhammad Hasham
@MohammadHasham
yeah
from a function
/** Javascript File **/
document.addEventListener("keydown",function(x){
var key = document.querySelector("audio[data-key=x]");
console.log(key);
});
@oppiniated
Clyde Lobo
@oppiniated
ok then replace the " with the `
Philipp Scholz
@philipp32
Hey, my function doesn't get triggered when I press the enter key? Why is that?
$('#search-bar').bind("enterKey",function(e){
  $('#random-button').fadeOut("slow");
  $( '#search-bar').animate({
    top: "-200px"    
  }, 1000, function() {
   // Animation complete.
 });

});
$('#search-bar').keyup(function(e){
  // if enter is pressed
    if(e.keyCode == 13)
    {
        $(this).trigger("enterKey");
    }

});
Clyde Lobo
@oppiniated
Since you are doing a string interpolation and need to use instead of"` for it
Muhammad Hasham
@MohammadHasham
it is returning me a null
@oppiniated
This message was deleted
Muhammad Hasham
@MohammadHasham
i am still struggling
Clyde Lobo
@oppiniated
var key = document.querySelector(`audio[data-key=${x}]`);
Muhammad Hasham
@MohammadHasham
can you tell me where am i doing it wrong
var key = document.querySelector("audio[data-key='${x}']");
@oppiniated
Clyde Lobo
@oppiniated
@MohammadHasham check my previous chat
Sorin Ruse
@sorinr
@MohammadHasham what do you want to get into the key var?
Muhammad Hasham
@MohammadHasham
i have written that provided by you but it says that it is not a valid queryselector
@sorinr i want to get the keycode and use that further.
Sorin Ruse
@sorinr
@MohammadHasham a valid selector is like "audio[data-key]"
Muhammad Hasham
@MohammadHasham
actually i have set some data-keys in audio in html so i want to get the desired keypress to make it equal to data-key
@sorinr
i figured that out!
@oppiniated @sorinr Thanks
CamperBot
@camperbot
mohammadhasham sends brownie points to @oppiniated and @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 520 | @oppiniated |http://www.freecodecamp.com/oppiniated
:star2: 1139 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
@MohammadHasham and if you wanted the value of data-key you needed key.dataset.key
Nathan
@Nathandim
Can someone help me with something about the weather app?
https://codepen.io/nathandim/pen/JENvXE is there a way to get the values of latitude and longitude outside of the callback function?
Sorin Ruse
@sorinr
@Nathandim you can do it like example
Jianhao Tan
@jaanhio
Dear all, i am attempting the "Build a personal portfolio webpage" challenge. may i know if it is actually possible to build that with html/css/bootstrap alone?
Nathan
@Nathandim
ohh nice idea
that makes the code a lot more cleaner
thank you @jaanhio
CamperBot
@camperbot
nathandim sends brownie points to @jaanhio :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @jaanhio |http://www.freecodecamp.com/jaanhio
Jianhao Tan
@jaanhio
@Nathandim what are you thanking me for? haha
Nathan
@Nathandim
lol dude
thank you @sorinr
CamperBot
@camperbot
nathandim sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles: