[jQuery] Fade-in Page Load
#1
Little code, but this will apply a nice fade in effect every time your forum page loads.

Open your 'headerinclude' template:
ACP > Templates & Styles > Templates {your_theme_name} Templates > Ungrouped Templates > headerinclude

Locate the code:
{$stylesheets}

Add before that:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

Save the template.

Open your header template:
ACP > Templates & Styles > Templates {your_theme_name} Templates > Header Templates > header

Add at the very beginning:
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function() {
	jQuery("#content").fadeIn(2000);
});
</script>

In the same template locate:
<div id="content">

Change it to:
<div id="content" style="display:none;">

Save the template.

Now see what happens ...

Note: In javascript; "2000" is the milisecond value of the fade in effect. Change the number asper your requirement (less value = quick fade-in, greater value = lengthy fade in).
Reply
#2
This user has been denied support. This user has been denied support.
any demo ?
Reply
#3
http://maskmod.in/index.php
Reply
#4
Nice tutorial, simple but nice. Though you could also add in a cookie so it only does it on the first load.
Reply
#5
Could be great for a dark theme.
Reply
#6
Or, may be light themes with light background ...

Thanx Eric Big Grin
Reply
#7
(2012-09-08, 01:37 PM)effone Wrote: Little code, but this will apply a nice fade in effect every time your forum page loads.

Open your 'headerinclude' template:
ACP > Templates & Styles > Templates {your_theme_name} Templates > Ungrouped Templates > headerinclude

Locate the code:
{$stylesheets}

Add before that:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

Save the template.

Open your header template:
ACP > Templates & Styles > Templates {your_theme_name} Templates > Header Templates > header

Add at the very beginning:
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function() {
	jQuery("#content").fadeIn(2000);
});
</script>

In the same template locate:
<div id="content">

Change it to:
<div id="content" style="display:none;">

Save the template.

Now see what happens ...

Note: In javascript; "2000" is the milisecond value of the fade in effect. Change the number asper your requirement (less value = quick fade-in, greater value = lengthy fade in).

It's a neat effect, but a bit annoying Toungue I can't wait to see more of your tutorials.
(2012-09-25, 08:28 PM)Leefish Wrote:
(2012-09-25, 08:19 PM)xStefan Wrote: Just got back from gym and eat some kit kats...

I am uninterested in your eating habits.
Reply
#8
(2012-09-10, 03:19 PM)Scois0n Wrote: It's a neat effect, but a bit annoying Toungue I can't wait to see more of your tutorials.

Yes, people stated its cool and and also annoying.
On the other hand I've found (in fact, ๖ۜParanormal™ pointed this out, thanks.) a stupid problem encountered applying this effect, I don't know the reason but the text editor messes up like this:

[Image: 02d39260.png]

So, keeping these two things in mind I've moved forward with an advanced tutorial, I'm sure you'll like this and that may be, not annoy you, also the editor problem will be fixed as well.

Keep an eye in the tutorial section ...
Reply
#9
This user has been denied support. This user has been denied support.
http://mybbaddict.com/thread-jquery-simp...ith-effect
Solution is here.
Reply
#10
(2013-01-14, 06:15 AM)xZero Wrote: http://mybbaddict.com/thread-jquery-simp...ith-effect
Solution is here.

And here also.
http://community.mybb.com/thread-126447.html

In fact I've done a tweak with the editor placement code which I didn't post. I have to do all the testings before publishing it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)