jQuery.SlideText
ΠΠ»Π°Π³ΠΈΠ½ ΠΏΡΠΎΠΊΡΡΡΠΊΠΈ ΡΠ΅ΠΊΡΡΠ° ΠΏΡΠΈ Π½Π°Π²Π΅Π΄Π΅Π½ΠΈΠΈ ΠΊΡΡΡΠΎΡΠ° ΠΌΡΡΠΈ
Π’ΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΡ
- jQuery v2+
Π£ΡΡΠ°Π½ΠΎΠ²ΠΊΠ°
npm i jquery-slidetext
ΠΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script> <script type="text/javascript" src="dist/jquery.slidetext.min.js"></script>
ΠΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅
CSS
.slidetext { width: 300px; white-space: nowrap; overflow: hidden; } .slidetext__content { font-family: 'Open Sans', sans-serif; font-weight: 700; }
HTML
<div class="container-example slidetext"> <span class="slidetext__content"> ΠΠ΅ ΡΠ»ΠΈΡΠΊΠΎΠΌ Π΄Π»ΠΈΠ½Π½ΡΠΉ ΡΠ΅ΠΊΡΡ, Π±ΡΠΊΠ²Π°Π»ΡΠ½ΠΎ Π½Π΅ΠΌΠ½ΠΎΠ³ΠΎ ΠΏΡΠΎΠΊΡΡΡΠΊΠΈ. </span> </div>
JavaScript
SlideText({ 'elbox' : '.slidetext', 'elcontent': '.slidetext__content', 'speed' : 177 });