Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 20:09
    @krisb1220 banned @Gastony
  • May 14 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 22:38
    @bjorno43 banned @real-action
  • Feb 01 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 2019 17:13
    @mstellaluna banned @cmal
  • Jan 08 2019 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
Ian Gracia
@iangracia
but shouldnt toPrecision(3) be the correct use?, should 12 give me like 11 decimals
Dennis Daubney Jr
@MrOolong
@piteto and if I don't want to manually specify the text to tweet? What if I want to tweet the quote in the DOM element that's generated from an array in the JS file?
piteto
@piteto
@MrOolong You would replace "your quote text" in that example above with a variable representing the text you want to tweet
In your case, the "textToTweet" variable
basically, to make your current window.open code work, you'll need to remove your html that pulls in the twitter widget code: //platform.twitter.com/widgets.js
Dennis Daubney Jr
@MrOolong
i think I just figured out another way
Ian Gracia
@iangracia
var x = 3.0599999999999996;

console.log(Number(x.toPrecision(1)));  //  3
console.log(Number(x.toPrecision(2)));  // 3.1
console.log(Number(x.toPrecision(3)));  // 3.06
console.log(Number(x.toPrecision(4)));  // 3.06 ????
console.log(Number(x.toPrecision(7)));  // 3.06????
console.log(Number(x.toPrecision(9)));  // 3.06???
why does it stop at 2 decimals
piteto
@piteto
@iangracia because there are only 2 significant digits after the decimal point. Try it with a different number, like: var x = 3.12345999999996;
CamperBot
@camperbot
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
api offline
Dennis Daubney Jr
@MrOolong
@piteto thank you for steering me in the right direction with the link to the twitter button. I got it to work with this twttr.widgets.createShareButton(
'/',
document.getElementById('quotebox'),
{
text: document.getElementById('quotebox').innerHTML
}
);
CamperBot
@camperbot
mroolong sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 186 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
@MrOolong No problem! I think you would want to use textContent instead of innerHTML, but it may not matter based on the content of your quotes.
Nickey Pickorita
@Pickorita
anyone knows how to align these 3 in the center? http://prntscr.com/gsws0e
All 3 elements are in 1 div element and are lists
Kaz Baig
@kbaig
@Pickorita could just use flexbox and margins
Nickey Pickorita
@Pickorita
but now when I resize it to smaller size
it is not centered
do you know how to fix it?
http://prntscr.com/gswver
http://prntscr.com/gswvnc
code:
.wrapperimages {
display:flex;
justify-content:center;
margin: 0 auto;
}
Kaz Baig
@kbaig
@Pickorita would have to make flex-direction column below a certain width
@Pickorita if you don't want to let the size of the image change
@Pickorita with align-items: center and your choice of justify-content
Nickey Pickorita
@Pickorita
doesn't work when I add flex direction
Kaz Baig
@kbaig
With a media query for the width?
Like
@media (max-width: 500px) {
     .wrapperimages-parent {
         flex-direction: column;
         justify-content: space-around;
         align-items: center;
    }
}
Nickey Pickorita
@Pickorita
let me test 1sec
not working
Kaz Baig
@kbaig
@Pickorita would be a lot more helpful to have your code in a pen or something
piteto
@piteto
we really need a live demo to help you debug this - it can depend on a lot of things
Nickey Pickorita
@Pickorita
.wrapperimages {
    display:flex;
    justify-content:center;
    margin:auto;
}
@kbaig I don't have code pen
I'm doing it in dreamweaver
Kaz Baig
@kbaig
@Pickorita wrapperimages is the class for the children right? flex has to go on the parent of the items flex is being applied to
piteto
@piteto
You don't need an account - create an anonymous pen: https://s.codepen.io/pen?editors=1101
Nickey Pickorita
@Pickorita
yea its a class for a div
and there are 3 lists
this is how it looks
Kaz Baig
@kbaig
Are each of the boxes in that screenshot a div with class wrapperimages?
Nickey Pickorita
@Pickorita
no each box is a list
there is 1 UL
and then 3 LI items
each li item is 1 image
Can you see @kbaig
screenshot above
let me paste code

```

<div class="wrapperimages">
<section class="portfolio">
<ul class="portfolio-grid portfolio-galery-3 clearfix masonry" id="portfolio-grid">

            <li class="portfolio-item mix cat1">
                <div class="portfolio-style-1 entry wow fadeIn" data-wow-duration="1s" data-wow-delay="0.2s" style="visibility: visible; animation-duration: 1s; animation-delay: 0.2s; animation-name: fadeIn;">
                    <img src="img/work-img3.png">
                    <div class="magnifier">
                        <div class="visible-title">
                            <h4><a href="#">Project Name</a></h4>
                            <small>
                                <a href="#">Category</a>
                            </small>
                        </div>
                        <!-- end visible title -->
                        <div class="visible-title1 clearfix">
                            <span class="pull-left">
                                <a data-rel="prettyPhoto" href="img/screencapture-file-C-Users-Pickorita-Desktop-ITA-DW-Honey-20Cake-20Site-index-html-1506611749492.png">
                                <i class="fa fa-search"></i>
                                </a>
                            </span>
                            <span class="pull-right">
                                <a href="#">
                                    <i class="fa fa-heart"></i>
                                300</a>
                            </span>
                        </div>
                    </div>
                </div>
            </li>

```

Kaz Baig
@kbaig
ul {
    display: flex;
    justify-content: space-around;
}

@media (max-width: 500px) {
    ul {
        flex-direction: column;
        align-items: center;
    }
}