Twitter scroll effect

You notice a scroll bar on the Twitter homepage.

What is the correct way to do this using jquery? I heard jquery is better than javascript.

+3
source share
3 answers

If you look at the source code, you can see the basic structure:

<div>
  <div>
    <ul>
      <li>Year Without Rain</li>
      <li>Gameday</li>
      <li>etc...</li>
    </ul>
  </div>
  <span class="fade fade-left">&nbsp;</span>
  <span class="fade fade-right">&nbsp;</span> 
</div>

ul - , . , . , ( , ). , Twitter, , . , .

, .fade-left .fade-right. , . , : http://s.twimg.com/a/1283564528/images/fronts/fade-trends2.png. z-index, , .

Twitter jQuery ( , , jQuery - JavaScript, JavaScript), , .

+3

I recreated twitter frame: Twitter marquee

I used raw javascript and automated it so that if you advertise sitelinks it will calculate the width and know when to cut it and go back to zero

+1
source

Source: https://habr.com/ru/post/1763266/


All Articles