Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery prevent redirect until after animation
    primarykey
    data
    text
    <p>This code works perfectly except when you click on a link, The page is redirected before jquery has a change to visually animate the margin back to zero. Is there a way to prevent the redirect until after jquery animates the margin back to zero?</p> <p>HTML</p> <pre><code> &lt;div id="sidebar"&gt; &lt;div class="navigation"&gt; &lt;ul&gt; &lt;a href="../../../index.html"&gt;&lt;li&gt;&lt;img src="dbs/images/home.png" title="" width="40" height="38" /&gt;به عقب&lt;/li&gt;&lt;/a&gt; &lt;a href="../../000_Movies/_assets/playlist.html"&gt;&lt;li&gt;فیلم ها&lt;/li&gt;&lt;/a&gt; &lt;a href="../../020_IAM/_assets/playlist.html"&gt;&lt;li&gt;وزارتخانه ها ایران زنده&lt;/li&gt;&lt;/a&gt; &lt;a href="../../080_Worship/_assets/playlist.html"&gt;&lt;li&gt;پرستش&lt;/li&gt;&lt;/a&gt; &lt;a href="../../330_Teen/_assets/playlist.html"&gt;&lt;li&gt;جوانان&lt;/li&gt;&lt;/a&gt; &lt;a href="../../300_Children/_assets/playlist.html"&gt;&lt;li&gt;کودکان&lt;/li&gt;&lt;/a&gt; &lt;a href="../../400_Testimony/_assets/playlist.html"&gt;&lt;li&gt;پزوهش ها&lt;/li&gt;&lt;/a&gt; &lt;a href="../../600_SOC/_assets/playlist.html"&gt;&lt;li&gt;دانشکده مسیح&lt;/li&gt;&lt;/a&gt; &lt;a href="../../750_Women/_assets/playlist.html"&gt;&lt;li&gt;زنان&lt;/li&gt;&lt;/a&gt; &lt;a href="../../800_BAHAM/_assets/playlist.html"&gt;&lt;li&gt;کلیپ های سری&lt;/li&gt;&lt;/a&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>JS</p> <pre><code>$('.navigation a li').click(function () { $('.slider').animate({ marginLeft: 0 }, 500); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    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