Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-05-2012, 08:48 PM   PM User | #1
thebigkick
New Coder

 
Join Date: Nov 2011
Location: Austin, Texas, USA
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
thebigkick is an unknown quantity at this point
How do you get this effect?

When I reload this page (http://automattic.com/news/) the content starts from the top left and is "fanned out" onto the page.

I'm new to JS and I couldn't understand much off the Chrome inspector.

thanks
thebigkick is offline   Reply With Quote
Old 12-05-2012, 09:03 PM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,579
Thanks: 62
Thanked 4,064 Times in 4,033 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Well, that seems to be some proprietary code, but the concept doesn't seem too difficult. I can think of two ways to do it, right off. Give me a while and I'll come up with a few more ways.

Simplest way:

Put an overlay <div> on the page to start with, one that covers the main area of the page. Then use JS to "shrink" that overlay, moving its top left corner down and right over a period of time. Thus the content of the page is progressively revealed.

But I think we could refine that.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 12-06-2012, 05:53 AM   PM User | #3
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,554
Thanks: 9
Thanked 480 Times in 463 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
maybe something like :
Code:
<style>
body #mydiv>* { 
   zoom: 0.1; 
  -o-transition-property: all; -o-transition-duration: 120ms; 
  -webkit-transition-property: all; -webkit-transition-duration: 120ms; 
  -moz-transition-property: all; -moz-transition-duration: 120ms; 
  transition-property: all; transition-duration: 120ms; 
}

body.zoom1 #mydiv>* { zoom: 0.3; }
body.zoom2 #mydiv>* { zoom: 0.6; }
body.zoom0 #mydiv>* { zoom: 1; }
</style>
<script>
setTimeout("document.body.className='zoom1';", 60);
setTimeout("document.body.className='zoom2';", 140);
setTimeout("document.body.className='zoom0';", 220);
</script>
where #mydiv is a selector pointing to the repeating item container.
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:15.2% IE7:0.5% IE8:8.4% IE9:8.5% IE10:8.5%

Last edited by rnd me; 12-06-2012 at 05:56 AM..
rnd me is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:07 PM.


Advertisement
Log in to turn off these ads.