Click here to Skip to main content
15,900,378 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how TO marquee multiple text in a label???is it possible???example will take sunday to Saturday...each one display line by line in single box..
Posted
Comments
Maciej Los 26-Aug-15 1:58am    
What have you tried? Where are you stuck?
kesavan ms 26-Aug-15 7:27am    
I want like this type of answer:: in HTML
just one sentence will display in a small box with marquee (up) direction. After that another one sentence also will display in the same box. More than 10 sentence is continuously scrolling in that box only. At the same time one sentence only will display in the box.

1 solution

Your html will look like this,

HTML
<div style="width:75px;display:inline">
<div class="weekdays active" style="float:left;width:75px;">Sunday</div>
<div class="weekdays" style="float:left;width:75px;display:none;">Monday</div>
<div class="weekdays" style="float:left;width:75px;display:none;">Tuesday</div>
<div class="weekdays" style="float:left;width:75px;display:none;">Wednesday</div>
<div class="weekdays" style="float:left;width:75px;display:none;">Thursday</div>
<div class="weekdays" style="float:left;width:75px;display:none;">Friday</div>
<div class="weekdays" style="float:left;width:75px;display:none;">Saturday</div>
</div>


In javascript
JavaScript
var dayNumber = 0;
   var intervalCount = 0;
   var totalDays = 7;
   setInterval(function () {
       var $active = $('.weekdays').parent().find(".active");//[intervalCount % totalDays];
       var $next = $($active).next().length == 0 ? $('.weekdays').first() : $active.next();
       $active.removeClass('active').hide('slide', { direction: 'left' }, 1000);
       $next.addClass('active').show('slide', { direction: 'right' }, 1000);
       intervalCount++;
   }, 2000);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900