Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery animations happen randomly
    primarykey
    data
    text
    <p>I have a kind of splash screen, where you press one of the logo's and it animates the logo to the center, then loads the content for it. Then when you press the main top logo, it hides the content and goes back to the splash screen. However I am having problems with this.</p> <p>Such as, the container hides, then comes back.</p> <p>Look for yourself: <a href="http://dan.roguedraco.net/SpyroDev/" rel="nofollow">http://dan.roguedraco.net/SpyroDev/</a> If happens if you click the top logo before the content has fully appeared, but I want to allow for all these occurences. Because it is possible a user may do the same.</p> <p>Javascript:</p> <pre><code>$(document).ready(function() { var inPage = false; $('.ajax-loader').click(function() { if(inPage == false) { inPage = true; var Obj = this; $(Obj).siblings("a").fadeOut(500,function() { if($(Obj).hasClass('left') || $(Obj).hasClass('right')) { $(Obj).animate({left:'300px'},'slow','easeOutBack',function() { $('#pageContent').fadeIn(500,function() { $("#tabs").tab(); }); }); } else { $('#pageContent').fadeIn(500,function() { $("#tabs").tab(); }); } $(Obj).addClass('current-project'); }); } }); $('#rootLogo').click(function() { var Obj = $('.current-project'); if(inPage == true) { inPage = false; $('#pageContent').fadeOut(500,function() { $(this).hide(); if($(Obj).hasClass('left')) { $(Obj).animate({left:'0px'},'slow','easeOutBack',function() { $(Obj).siblings("a").fadeIn(500); }); } else if($(Obj).hasClass('right')) { $(Obj).animate({left: '600px'},'slow','easeOutBack',function() { $(Obj).siblings("a").fadeIn(500); }); } else { $(Obj).siblings("a").fadeIn(500); } $(Obj).removeClass('current-project'); }); } }); </code></pre> <p>});</p> <p>Html:</p> <pre><code> &lt;div id="thumbnails"&gt; &lt;div class="row-fluid"&gt; &lt;div class="span12" style="text-align: center;color:#fafafa;"&gt; Click a plugin title for more information and downloads. &lt;/div&gt; &lt;/div&gt; &lt;div class="row-fluid"&gt; &lt;div class="span12" id='thumbnails'&gt; &lt;a href="#" class="ajax-loader left" project="JumpPorts" page="Home"&gt;&lt;img src="projects/JumpPorts/thumb.png" alt="JumpPorts" /&gt;&lt;/a&gt; &lt;a href="#" class="ajax-loader" project="RankUpOnKills" page="Home"&gt;&lt;img src="projects/RankUpOnKills/thumb.png" alt="RankUpOnKills" /&gt;&lt;/a&gt; &lt;a href="#" class="ajax-loader right" project="InfoButton" page="Home"&gt;&lt;img src="projects/InfoButton/thumb.png" alt="InfoButton" /&gt;&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="pageContent" style="display:none;"&gt; &lt;div class="row-fluid"&gt; ... </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload