A cool template trick for Movable Type users
I saw an effect in a WordPress theme that was pretty novel, so I thought I would share here how to reproduce it on a Movable Type theme using JQuery.
<script type="text/javascript">
function fadeHeader()
{
$("#header").hide().fadeIn(5000, undefined);
}
</script>
The code is straight forward (provided you understand JQuery at least somewhat). It grabs the <em>header</em> <div>, hides it and then fades it in over five seconds. If you want to do this automatically, rather than having to call a JavaScript function, just do:
<script type="text/javascript">
$(window).load({
$("#header").hide().fadeIn(5000, undefined);
});
</script>
Quick note: <em>undefined</em> is passed there because I didn't want to use a callback function. If you have a function that you want to execute as a callback when fadeIn completes, just pass it as a parameter.
No TrackBacks
TrackBack URL: http://www.codemonkeyramblings.com/mt/mt-tb.cgi/306
Sign In
Google Search
Elsewhere
- Mike Answered Lost Username and PW during upgrade on MT.org
- Mike Answered Schema upgrade doesn’t happen with 4.261 on MT.org
- Mike Answered problem with flash applet in dashboard on MT.org
- Mike Answered multi-blog installation and discovery on MT.org
- Mike Answered Stylesheet Module problem on MT.org
- Mike Answered multi-blog installation and discovery on MT.org
- Mike Answered Stylesheet Module problem on MT.org
- Mike Answered Stylesheet Module problem on MT.org
- Mike Answered Server locks up when inserting file or image…. on MT.org
- Mike Answered Server locks up when inserting file or image…. on MT.org
- Mike Answered MT Styles - Was there any real effort? on MT.org
- Mike commented on [Ask Proggit] How do you figure out how much to charge for freelancing? at Reddit
- Mike Answered defining user’s access rights on MT.org
- Mike Answered altering the archive template on MT.org
- Mike Answered All entry edit fields are missing from the entry posting page on MT.org
July 2009
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |
Monthly Archives
- July 2009 (1)
- June 2009 (31)
- May 2009 (36)
- April 2009 (39)
- March 2009 (42)
- February 2009 (51)
- January 2009 (48)
- December 2008 (44)
- November 2008 (52)
- October 2008 (55)
- September 2008 (51)
- August 2008 (52)
- July 2008 (44)
- June 2008 (39)
- May 2008 (35)
- April 2008 (38)
- March 2008 (68)
- February 2008 (44)
- January 2008 (56)
- December 2007 (45)
- November 2007 (18)
- October 2007 (41)
- September 2007 (40)
- August 2007 (24)
- July 2007 (35)
- June 2007 (43)
- May 2007 (36)
- April 2007 (33)
- March 2007 (50)
- February 2007 (54)
- January 2007 (54)
- December 2006 (43)
- November 2006 (31)
- October 2006 (37)
- September 2006 (30)
- August 2006 (52)
- July 2006 (36)
- June 2006 (30)
- May 2006 (58)
- April 2006 (47)
- March 2006 (60)
- February 2006 (65)
- January 2006 (17)
- December 2005 (20)
- November 2005 (4)


Leave a comment