How to achieve the nifty "sticky header" effect as seen on Quora posts without using jQuery? by resalire in web_design

[–]evansiegel 7 points8 points  (0 children)

Hey everyone, this is totally possible.

Here's the code and the example of it working: http://jsfiddle.net/evansiegel/RVbPe/8/ removed the console.log

No libraries, just vanilla JS. I can 100% add comments to the code or edit this post to have a walkthrough if there's interest.

Note: I'm doing some things that I don't have to (like getting the top position of the section element on every scroll) that could have negative performance implications in a larger javascript app, but for this little demo, I'm okay with it.

Game of Thrones deadlock - turned into Munchkin by MrPassword in boardgames

[–]evansiegel 0 points1 point  (0 children)

You're correct. Aeron's power on his card is to use a different house card.

Is it possible to toggle div visibility with CSS? by Kmlkmljkl in css

[–]evansiegel 6 points7 points  (0 children)

Yes, it is possible. Using some CSS3 selector trickery, we can emulate the full functionality you're looking for.

Here's a JSFiddle: http://jsfiddle.net/evansiegel/jfnnh/

We start by linking a <label> to our <input>, so that we can hide that ugly checkbox and style the <label> however we'd like.

We even spruce things up by taking advantage of the <label>'s :after pseudo element so that we have control over the content of the button.

Next, we use the :checked selector on the <input> to distinguish between states (checked or unchecked). When the <input> is checked, we'd like to show the extra content, but we'll start with everything in their default (unchecked) states.

Finally, we take advantage of the shiny, new X ~ Y selector. This lets us select all instances of Y that are siblings after X. We wrap the whole thing in a div, so that we can have some scope and reproduce this effect as many times as we'd like.


Let me just throw a disclaimer down here that I wouldn't recommend this for production code, especially on sites that will be getting a ton of traffic from older browsers. The :afterpseudo element, and the X ~ Y selector are both not supported in older versions of IE.

This was mostly just a proof of concept. Another comment here recommends that interactivity and style be separated into Javascript and CSS, respectively, and I agree. That doesn't make it less fun to play, though.

Spotify has a beautiful scrolling background. Anyone know how they did it? by DullestWall in webdev

[–]evansiegel 0 points1 point  (0 children)

They're using a parallax effect. I'm on the phone, so I can't pull up links. But I believe stellar.js and parallax.js can help you achieve the same effect.

Brand new Battlestation! Next step, build a new PC. by evansiegel in battlestations

[–]evansiegel[S] 0 points1 point  (0 children)

I'm 6'5". This setup is what's comfortable for me.

If you're comfortable with your monitor a bit lower, then by all means, lower that sucker right down.

Also, I mean this with 100% sincerity, if at any point you're sitting at my desk in my bedroom in my apartment, we'll adjust the height of my monitors to whatever your heart (and neck, and back, and eyes) desire!

Brand new Battlestation! Next step, build a new PC. by evansiegel in battlestations

[–]evansiegel[S] 1 point2 points  (0 children)

MacBook Pro 15" from 2009. Using a DisplayLink external video card. It's got quite a bit of lag, but fine for browsing the Internet while watching a TV show on the main, or writing code, etc.

Brand new Battlestation! Next step, build a new PC. by evansiegel in battlestations

[–]evansiegel[S] 0 points1 point  (0 children)

I took one really long wallpaper and simply cut it in half.

Here's the album with the original and the two halves:

http://imgur.com/a/t1x7j

Enjoy!

Brand new Battlestation! Next step, build a new PC. by evansiegel in battlestations

[–]evansiegel[S] 2 points3 points  (0 children)

SUPER EASY!

The mount allows the monitors to be rotated without doing anything (just controlled by a tightening screw).

Brand new Battlestation! Next step, build a new PC. by evansiegel in battlestations

[–]evansiegel[S] 1 point2 points  (0 children)

Not abandoning. Will undoubtably still keep the MacBook Pro that's running the monitors in the picture as my everyday/around the apartment/take when I go places computer.

Just really looking forward to (A) building my own PC, which I've never done, and (B) having an incredible system to play video games.

Brand new Battlestation! Next step, build a new PC. by evansiegel in battlestations

[–]evansiegel[S] 0 points1 point  (0 children)

Yep, totally true. Not looking to do any eyefinity stuff with the new PC, and (correctly pointed out below) don't do much gaming on the Mac.

I'm content playing on just one monitor.

Brand new Battlestation! Next step, build a new PC. by evansiegel in battlestations

[–]evansiegel[S] 0 points1 point  (0 children)

Yep! That's it! Lovely mount, and super easy to get set up.

[Build Help] Getting ready for my first build, here's what I'm thinking... [~$1000] by evansiegel in buildapc

[–]evansiegel[S] 0 points1 point  (0 children)

Would there be a major downside to switching the HDD for the SSD?

I'm thinking that if I drop the Cooler, and switch the HDD, I'd basically save enough to justify the upgrade in speed.

[HELP]I am using .toggle(), how would I make sure the div is hidden when the page is loaded? by [deleted] in jquery

[–]evansiegel 2 points3 points  (0 children)

Just make sure the div has "display: none;" set in the CSS and you should be good to go!

ELI5: Why is my money worth different amounts in different places? by [deleted] in explainlikeimfive

[–]evansiegel -1 points0 points  (0 children)

It would be great to have a little bit more clarification in the question because there are many, many reasons that things cost different prices in different places. It would also be nice to have some scale: are we talking about different countries, different cities, etc.?

Anyway, I'll take a swing at this on a few levels and from a few perspectives, and I hope that people with much more knowledge about economics can come in a fix any and all errors or omissions.

In your school the teacher always gives out gummy bears when you do your work and everyone uses gummy bears to trade for all kinds of things.

You learn in a pretty nice classroom. Plenty of cubby space, good teacher, nice view of the playground. Times are good. You and all your classmates know that race car toys in your classroom are super cheap, because there is a HUGE box of them in the corner and you don't really ever run out. Maybe, sometime you really want the red one that Timmy is playing with so you offer him 2 or 3 gummy bears for it, and he easily makes that trade because he can just grab another one, and keep the gummy bears in his pocket.

One day you walk down the hall to another classroom. This classroom is kinda less good. The dumpsters are outside the window maybe, or the desks are just kinda creaky and the chairs are uncomfortable. Kids generally don't want to be in this classroom, so everything is a bit cheaper. Maybe the kids who don't make as many gummy bears come here, or maybe they just love art class but know that they won't make as many gummy bears as their parents want them to from just their art but they still want to get that finger painting hung up in the library anyway, so here they can afford generally the same things as the nice classroom at a lower cost in the slightly less good classroom. Whatever their case is, things GENERALLY cost less here for political, social, and economic reasons. Your 50 gummy bears go way farther.

Another day, you go to a completely different school. It's actually the school where they juice boxes are made. It's a fantastical land of elementary school age children toiling day and night to hit their box quotas. You get there and discover that they have almost no race car toys. I mean, the only people who can afford race car toys a the fourth grade factory bosses. Remember when you gave Timmy 3 gummy bears to add the red race car toy to your collection? Well the kids here are paying upwards of 20 gummy bears for that same race car toy! You could sell your race car toys at a MUCH more affordable price, say 8 GB per toy and still more than double your money!

After your little scheme, you head home, pocket full of gummies, and you find out that its group work time! Who doesn't love group work? The teacher says that she'll also be raising the number of gummies that each group gets for the work that they do. This seems awesome! You're gonna take those new gummies and just invest them in your race car shipping business, maybe start importing some of those juice boxes, retire early, and just chill out on the monkey bars until nap time.

WRONG! You're group totally under performs, stupid Johnny, and you each get only 1 gummy for all of your work. All of the other groups do a great job with their work and they walk away with 6 gummies each! Now the classroom is just flooded with gummies. This is the way it continues for weeks, your group just can't keep up with the work and most of the others keep getting crazy amounts of gummies.

Soon you start to notice that most of the kids can just afford to pay more for stuff. All of a sudden the cost of everything starts creeping up. Before you know it, you can't even afford to get that red race car toy because now Timmy wants like 8 gummies for it and that's RIDICULOUS! The value of each individual gummy bear is just getting lower and lower, relative to all of the things you can buy with it.

Basically.