Time for another in my series of occasional posts over-explaining simple programming tasks that took me longer to figure out than they should have.
Here’s the simple HTML:
With jQuery, you fade an element out by first selecting the particular element. which you can do by putting its ID in quotes and prefixing it with a #:
$("#fader"). Then you tell that element what method you want to execute, which in this case is the jQuery “fadeOut” command, with a duration expressed in
microsecondsmilliseconds. Put ‘em together and you get the simple-but-powerful jQuery statement:
$("#fader").fadeOut(500);. Likewise for the
If you’re me, the first thing you’ll try will be:
Click here to give it a try on the following sample text:
So here’s a way that works. (Note that I’m not saying it’s the best or right way. If it’s worse than that, if it’s actually the wrong way, please leave a comment and I’ll link to it at the top of his post. Thanks!)
Click here to to try it on the text below:
The difference is that the second way adds a function to the jQuery’s fadeOut command that is invoked only after the fadeOut is completed. That function changes the text of the element and fades it in.
(Click here to reset both examples.)
(PS: I created the tables for the code by pasting it in here.)
Tagged with: jquery
Date: August 17th, 2014 dw
Despite the claims of some — and unfortunately some of these some run the companies that provide the US with Internet access — there are n reasons why we need truly high-speed, high-capacity Internet access, where n = everything we haven’t invented yet.
If we had truly high-speed, high-capacity Internet access, protesters in Ferguson might have each worn a GoPro video camera, or even just all pressed “Record” on their smartphones, and those of us not in Ferguson could have dialed among them to see what’s happening. In fact, it’s pretty likely someone would have written an app that treats co-located video streams as a single source to be made sense of, giving us fish-eye, fly-eye perspectives anywhere we want to focus: a panopticon for social good.
This week there were two out-of-the-park posts by Berkman folk: Ethan Zuckerman on advertising as the Net’s original sin, and Zeynep Tufecki on the power of the open Internet as demonstrated by coverage of the riots in Ferguson. Each provides a view on whether the Net is a failed promise. Each is brilliant and brilliantly written.
Zeynep on Ferguson
Zeynep, who has written with wisdom and insight on the role of social media in the Turkish protests (e.g., here and here), looks at how Twitter brought the Ferguson police riots onto the national agenda and how well Twitter “covered” them. But those events didn’t make a dent in Facebook’s presentation of news. Why? she asks.
Twitter is an open platform where anyone can post whatever they want. It therefore reflects our interests — although no medium is a mere reflection. FB, on the other hand, uses algorithms to determine what it thinks our interests are … except that its algorithms are actually tuned to get us to click more so that FB can show us more ads. (Zeynep made that point about an early and errant draft of my CNN.com commentary on the FB mood experiment. Thanks, Zeynep!) She uses this to make an important point about the Net’s value as a medium the agenda of which is not set by commercial interests. She talks about this as “Net Neutrality,” extending it from its usual application to the access providers (Comcast, Verizon and their small handful of buddies) to those providing important platforms such as Facebook.
She concludes (but please read it all!):
How the internet is run, governed and filtered is a human rights issue.
And despite a lot of dismal developments, this fight is far from over, and its enemy is cynicism and dismissal of this reality.
Don’t let anyone tell you otherwise.
What happens to #Ferguson affects what happens to Ferguson.
Yup yup yup. This post is required reading for all of the cynics who would impress us with their wake-up-and-smell-the-shitty-coffee pessimism.
Ethan on Ads
Ethan cites a talk by Maciej Ceglowski for the insight that “we’ve ended up with surveillance as the default, if not sole, internet business model.” Says Ethan,
I have come to believe that advertising is the original sin of the web. The fallen state of our Internet is a direct, if unintentional, consequence of choosing advertising as the default model to support online content and services.
Since Internet ads are more effective as a business model than as an actual business, companies are driven ever more frantically to gather customer data in order to hold out the hope of making their ads more effective. And there went out privacy. (This is a very rough paraphrase of Ethan’s argument.)
Ethan pays more than lip service to the benefits — promised and delivered — of the ad-supported Web. But he points to four rather devastating drawbacks, include the distortions caused by algorithmic filtering that Zeynep warns us about. Then he discusses what we can do about it.
I’m not going to try to summarize any further. You need to read this piece. And you will enjoy it. For example, betcha can’t guess who wrote the code for the world’s first pop-up ads. Answer: Ethan .
Also recommended: Jeff Jarvis’ response and Mathew Ingram’s response to both. I myself have little hope that advertising can be made significantly better, where “better” means being unreservedly in the interests of “consumers” and sufficiently valuable to the advertisers. I’m of course not confident about this, and maybe tomorrow someone will come up with the solution, but my thinking is based on the assumption that the open Web is always going to be a better way for us to discover what we care about because the native building material of the Web is in fact what we find mutually interesting.
Read both these articles. They are important contributions to understanding the Web We Want.
, echo chambers
, net neutrality
, open access
, social media
Tagged with: advertising
• net neutrality
• social media
Date: August 15th, 2014 dw
Because it’s August and I’m at a lake:
The great blue is such an ungainly bird
that “heron” should be an explainly word.
It flaps so slow as it takes to the air
I could beat it by climbing stairs.
It’s great, it’s blue, it’s a little absurd.
A pile of sticks became a bird.
Tagged with: birds
Date: August 12th, 2014 dw
I admired Robin Williams even though he wasn’t exactly my cup of tea as a comedian. But, he was obviously brilliant, and by all reports was humble and kind. We need to celebrate people who turn down every opportunity to act like assholes.
Here’s just one example. Robin Williams met Christopher Reeve at Julliard and the two remained close friends. When Reeve became paralyzed, Williams stayed by him, a source of laughter and hope. From what I’ve heard, you could not have asked for a better friend.
It makes me all the sadder that Robin Williams just couldn’t carry on with his extraordinary, difficult, and very human life.
Date: August 12th, 2014 dw
Dan Brickley points to this incredibly prescient article by Tim Berners-Lee from 1992. The World Wide Web he gets the bulk of the credit for inventing was thriving at CERN where he worked. Scientists were linking to one another’s articles without making anyone type in a squirrely Internet address. Why, over a thousand articles were hyperlinked.
And on this slim basis, Tim outlines the fundamental challenges we’re now living through. Much of the world has yet to catch up with insights he derived from the slightest of experience.
May the rest of us have even a sliver of his genius and a heaping plateful of his generosity.
Categories: free culture
, net neutrality
Tagged with: history
Date: August 9th, 2014 dw
I find this recycling of culture to be fascinating. Or, to be more precise, the recycling of culture is culture. No recycling, no culture. Anyway, I’m mainly blogging these because each is fun in its own way.
These are in chronological order, but you might want to start out by going backwards. [August 24 2014: Chrome decided to start autoplaying these. Ack! So I've replaced the embedded versions with links. Sorry!]
The original kid’s interview
The interview songified
The Gregory Brothers sing the songification
(I am a massive Gregory Brothers fan.)
Tagged with: apparently
Date: August 9th, 2014 dw
“Prescription Painkillers Kill More Than Heroin and Cocaine … Combined” [Liberty Voice]
“The U.S. spent more on defense in 2012 than the countries with the next 10 highest budgets … combined.” [NBC News]
“Apple Now Worth More Than Microsoft, Google … Combined” [Time Business]1
Just when you’ve been impressed by how much bigger something is than two other things we already think are big, there’s a short pause, then: “combined!”
We love the “more than ___ … combined” trope. How could we not? It exists to surprise us. Are you impressed that the U.S. solar industry employs more people than the gas industry? You are? How about that it employs more than the coal industry? Even more surprised? Excellent! But wait’ll you hear this: It’s bigger than the coal and gas industries combined! Combined!! I bet you didn’t see that coming! Boom!
“More than … combined” is structured like a joke. No wonder we love it so.
1Three dots added to each for comic timing.
Tagged with: combined
Date: August 8th, 2014 dw
I read in my alumni magazine today that one of my old teachers, Douglas Sturm, died on May 6.
The freshman seminar I took with Prof. Sturm modeled for me what intellectual discourse could be like. It set me on my course.
Prof. Sturm was sharp as a tack but never used his analytic skills to make things smaller. Rather, he modeled a way of inquiring into big ideas by asking careful questions, and then asking more questions. He was a brilliant teacher.
Only after I graduated did I learn that he was a committed community peace activist. That side of him did not show up directly on campus. But I would have been very glad to have him as a neighbor.
Thank you, Prof. Sturm. As with all the great teachers, you taught me more than you know.
By coincidence a couple of days ago I wrote this poem. (Remember, we are required to forgive one another’s bad poetry.)
If the death of each we knew
were stored as we do corn,
we each would have to buy a mule
and load it every morn.
Poor mule it is who in our wake
clip-clops uphill and back.
Poor mule it is who for our sake
stays hidden in its track.
Tagged with: poem
Date: August 2nd, 2014 dw
The Register just posted one of the most ridiculous pieces of clickbait trolling I’ve ever seen. They’re claiming that by posting the parody video below, the UK’s Open Rights Group is comparing people who defend their copyright to Hitler:
It helps to know a few things:
First, the movie the clip, taken from Downfall, has been used for this sort of re-titling parody well over a hundred times, with Hitler fulminating over everything from Miley Cyrus twerking to spam. (Here are seven recent parodies, and 25 from an article in 2009.) Note that the video above was created and posted by Brad Templeton in 2009.
Second, a few years ago, the producers of Downfall apparently got fed up with their movie becoming so well known and started issuing DMCA takedown notices for the parodies.
Third, two days ago the House of Lords protected parodies against copyright infringement suits — covered in the US by our policy of Fair Use. ORG linked to the Downfall parody to celebrate this victory for free speech.
So, it hurts my head how many ways The Register’s trolling gets things wrong. It’s as if someone were accused of violating Godwin’s Law because she invoked Godwin’s Law. [I am taking Godwin's Law as normative. Sue me.]
Here is the link to The Register article but I encourage you not to go there, just so they won’t feel that this sort of ridiculous trolling is profitable. Instead, we could perhaps invoke a version of the Streisand Effect by posting the video widely.
[A few hours later:] The Register just appended the following to their post:
Since the publication of this story, the ORG has contacted The
Register with this comment: “Earlier this week, the Open Rights
Group tweeted a Downfall parody about copyright on the day that
parody exceptions for copyright were approved by the House of
Lords. Downfall parodies are widely recognised and have been used
to great satirical effect about a wide range of subjects. It is
wilful ignorance to portray a Downfall parody as a direct
comparison with Hitler and Nazism.”
, open access
Tagged with: eff
• fair use
Date: August 1st, 2014 dw
Next Page »