Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you take a look at the source code, you can see the basic structure:</p> <pre><code>&lt;div&gt; &lt;div&gt; &lt;ul&gt; &lt;li&gt;Year Without Rain&lt;/li&gt; &lt;li&gt;Gameday&lt;/li&gt; &lt;li&gt;etc...&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;span class="fade fade-left"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="fade fade-right"&gt;&amp;nbsp;&lt;/span&gt; &lt;/div&gt; </code></pre> <p>The <code>ul</code> element is the list container containing the topics. The position of this element is animated to scroll it. When the scrolling list is about to come to the end, the contents of the list are appended to the end of the list (to simulate the list coming around and scrolling continuously). If this wasn't done, Twitter would probably have chosen to reverse the direction of the scroll. But how they did it is much nicer.</p> <p>To get the fading effect, the <code>.fade-left</code> and <code>.fade-right</code> elements are used. They are aligned to the left and right, respectably. They are set to be transparent and the image itself is a transparent gradient: <a href="http://s.twimg.com/a/1283564528/images/fronts/fade-trends2.png" rel="nofollow noreferrer">http://s.twimg.com/a/1283564528/images/fronts/fade-trends2.png</a>. Using <code>z-index</code>, it is positioned over the scrolling list, thus giving a transparent effect on both sides. </p> <p>Twitter does indeed use jQuery (but just so you know, jQuery is JavaScript, just a JavaScript framework) and I haven't taken the time to analyze the code, but it should be pretty straight forward to implement. </p>
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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