var lh = $("#quote-btns").css("height");
$("#quote-twitter").css("line-height", lh.value);
I am trying to retrieve the height of a div and set it to the line-height property for another element. I am following: http://api.jquery.com/css/ Any ideas on why it's not working?
console.log(lh)
say?
andrewchar sends brownie points to @scienceoflife :sparkles: :thumbsup: :sparkles:
:star: 66 | @scienceoflife | http://www.freecodecamp.com/scienceoflife
figure.effect-portfolio:hover img {
-webkit-transform: translate3d(0, -80px, 0);
transform: translate3d(0, -80px, 0);
}
figure.effect-portfolio:hover h2 {
-webkit-transform: translate3d(0, -100px, 0);
transform: translate3d(0, -100px, 0);
}
figure.effect-portfolio:hover p {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
andrewchar sends brownie points to @lcneves :sparkles: :thumbsup: :sparkles:
:star: 340 | @lcneves | http://www.freecodecamp.com/lcneves
background-attachment: scroll;
try just that… it will scroll but you could also leave it fixed and add a media query for small screens to make it scroll then
@media only screen and (max-width: 768px) {
#home {
background-attachment: scroll;
}
@media only screen and (max-width: 768px) {
#home:before {
background-attachment: scroll;
}
}
rphares sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1098 | @mutantspore | http://www.freecodecamp.com/mutantspore
andrewchar sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1099 | @mutantspore | http://www.freecodecamp.com/mutantspore
I've just started creating my about me page, I'm struggling on vertical and horizontal centering text inside my parent div.
Code: http://codepen.io/87maza/pen/yeRzwX
I've used css-tricks as reference, I did the flexbox and fixed height width method but it still won't center.
This was my reference: https://css-tricks.com/centering-css-complete-guide/
Thanks in advance!
@87maza my general practice for horizontal centering is:
ok, so even if I have a bunch of packages and dependencies and things in my project...i just open index.html and it works?
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>
<link rel="script" type="text/js" href="//cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react.min.js">
andrewchar sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:warning: andrewchar already gave mutantspore points
http://
infront of your URL
susangrattan sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1100 | @mutantspore | http://www.freecodecamp.com/mutantspore
&APPID=123123424k23g4f5234gf
"'http://api.openweathermap.org/data/2.5/weather?lat=' +lat+ '&lon=' +lon+ '&APPID=977c47562a4c5893ea88bbca1c425e98'"
susangrattan sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:warning: susangrattan already gave mutantspore points
&units=imperial
or metric
tyteeye510 sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1101 | @mutantspore | http://www.freecodecamp.com/mutantspore
mzeid1985 sends brownie points to @sok213 :sparkles: :thumbsup: :sparkles:
:star: 542 | @sok213 | http://www.freecodecamp.com/sok213
background-image : url("E:\images.jpg");
i have done this but its not working
mynameissal sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1102 | @mutantspore | http://www.freecodecamp.com/mutantspore
background-image : url("https://www.google.co.in/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwj0lK7A2-fKAhXHBo4KHcHOAu4QjRwIAw&url=http%3A%2F%2Fgetlatestwallpapers.com%2Famazing-and-wonderful-world-best-animated-images-and-photos%2Flatest-wonderful-pc-and-laptop-wallpaper-free%2F&psig=AFQjCNGGY2HcoGD_AkIsQyFvkoxtROMhEw&ust=1455005364392710");
jennhardy sends brownie points to @andrewchar :sparkles: :thumbsup: :sparkles:
:star: 274 | @andrewchar | http://www.freecodecamp.com/andrewchar
#secondDiv {
background-image : url("http://getlatestwallpapers.com/wp-content/uploads/2015/02/latest-wonderful-pc-and-laptop-wallpaper-free.jpg");
}
zoher-ali sends brownie points to @sok213 :sparkles: :thumbsup: :sparkles:
:star: 543 | @sok213 | http://www.freecodecamp.com/sok213
max - min + 1)) + min
is 10 which is the length of the array
arr[randomchoice][0]
arr[randomchoice][1]
:star: 1103 | @mutantspore | http://www.freecodecamp.com/mutantspore
andrewchar sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
Anyone have any idea on how I can fix my font resizing script?
Some important info:
https://jsfiddle.net/himynameissal/dn3ekoos/
Thanks, in advance.
sigursiguros sends brownie points to @lcneves :sparkles: :thumbsup: :sparkles:
:star: 341 | @lcneves | http://www.freecodecamp.com/lcneves
$("#quote-text")
on some of the lines which is one problem among many, after you change those lines your font size just ends up getting increasing smaller every time you generate a new quote.
mynameissal sends brownie points to @jnmorse :sparkles: :thumbsup: :sparkles:
:star: 378 | @jnmorse | http://www.freecodecamp.com/jnmorse
quoteShown = myQuotes[getRandomIntInclusive(0, myQuotes.length -1)];
without the -1 occasionally it was trying to grab a quote that did not exist
@mynameissal also your splitting the quote text and the author name, then for some reason slicing those values which I don't know what for, you could just store an array of objects for your quotes and not split them later, something like
var quotes = [
{text: 'some quote test', author: 'author name'},
{text: 'another quote', author: 'some other author'}
];
then when your displaying the quote text you can just use something like quotes[index].text
about:config
geo.enabled
then double click the "value" option and it should become enabled and show true
as the value.
mahouk sends brownie points to @mynameissal :sparkles: :thumbsup: :sparkles:
:star: 284 | @mynameissal | http://www.freecodecamp.com/mynameissal
TypeError: (".r" + i).css is not a function
for: https://jsfiddle.net/himynameissal/0z1mpm7s/
mynameissal sends brownie points to @jnmorse :sparkles: :thumbsup: :sparkles:
:star: 379 | @jnmorse | http://www.freecodecamp.com/jnmorse
reconstructing
the twetter button for each quote in order to be able to populate the field as you like. Hope it helps. Good luck !
document.getElementById("quote-twitter-link").href = "https://twitter.com/intent/tweet?hashtags=quotes&related=freecodecamp&text=" + quoteShown;
<a href="" id ="quote-twitter-link"><div id="twitter-btn"></div></a>
this is what i have so far
<a href="https://twitter.com/share" class="twitter-share-button" data-text="hey" data-via="Andrew_Char">Tweet</a>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
```
do i have to change that stuff to what you posted
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
Refused to display 'https://twitter.com/intent/tweet?hashtags=quotes&related=freecodecamp&text=Check%20out%20this%20cool%20quote%20generator!' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'".
for the findle
<a href="https://twitter.com/share" id=" twiterbtn" class="twitter-share-button" data-text="hey" data-via="Andrew_Char">Tweet</a>
$("#twitter-btn").data-text = getRandom(); }
generateBtn.onclick = function() {
in your js section
$("#twiterbtn").data-text = getRandom(); }
sacharias sends brownie points to @finklez :sparkles: :thumbsup: :sparkles:
:star: 472 | @finklez | http://www.freecodecamp.com/finklez
andrewchar sends brownie points to @mynameissal :sparkles: :thumbsup: :sparkles:
:star: 285 | @mynameissal | http://www.freecodecamp.com/mynameissal
transition
and animation
keccakec sends brownie points to @finklez :sparkles: :thumbsup: :sparkles:
:star: 473 | @finklez | http://www.freecodecamp.com/finklez
ninja-ml sends brownie points to @jondcoleman :sparkles: :thumbsup: :sparkles:
:star: 513 | @jondcoleman | http://www.freecodecamp.com/jondcoleman
function decTime() {
//fill the circle
filler(countDown);
// display the current count down
showCount();
// decrement the counter if it's not at zero
if (countDown > 0) {
countDown--;
} else {
countDown = breakSeconds;
if (countDown > 0) {
countDown--;
} else {
// stop the timer
clearInterval(intervalID);
}
}
noczesc sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1104 | @mutantspore | http://www.freecodecamp.com/mutantspore
href="https://twitter.com/intent/tweet?text=Hello%20world”
and you use JS to change the text data
@mutantspore http://codepen.io/amirghafouri/pen/MKPvRa?editors=0010
I messed around with the fill effect (width instead of height), and it was working.
Started messing around with the decTime function to change session types and it stopped working
if (timerType == 'session') { ….
and in that if I set things up for the break time, cleared the clock face, sounded the alarm and changed the flag to be timerType = “break”. So obviously if the timerType was “break” i’d do a similar thing but for the session values. there is no need to actually stop the timer … just change the values. You only really need to stop it for “stop” or “reset” or maybe “pause"
@gr4vy You’ll most likely get help for that project in the Data Visualization help room
Find the best room for your needs, tell the name of the challenge, and paste your code :)
[FreeCodeCamp/HelpJavaScript]
[FreeCodeCamp/HelpFrontEnd]
[FreeCodeCamp/HelpDataViz]
[FreeCodeCamp/HelpBackEnd]
gr4vy sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 1105 | @mutantspore | http://www.freecodecamp.com/mutantspore