Witam

Napisałem prosty skrypcik - slider tekstu na stronie.
Mam jedyny problem, którego nie udaje mi się rozwiązać otóż zanim pojawi się napis mam przez chwilę samo zielone tło z cieńszym paskiem.

Jak zrobić aby od razu pojawił się pierwszy napis na zielonym tle, a nie cieńszy zielony pasek bez napisu?

Zielony pasek ze sliderem nałożyłem na duże zdjęcie znajdujące się na środku.
http://www.migrapolis.pl/pl/

Kod html

  1. <div id="slider" class="uk-responsive-width uk-responsive-height">
  2. <div class="slider-content" id="tabs">
  3. <div class="tab-content" id="tabs1">
  4. z nami znajdziesz właściwą drogę
  5. </div>
  6. <div class="tab-content" id="tabs2">
  7. test 2
  8. </div>
  9. </div>
  10. </div>


Kod .js
  1. $(document).ready(function() {
  2. $('.sd-buttons a').click(function(){
  3. switch_tabs($(this));
  4. });
  5. switch_tabs($('.defaulttab'));
  6. });
  7.  
  8.  
  9.  
  10. function switch_tabs(obj) {
  11. $('.tab-content').hide();
  12. var id = obj.attr("rel");
  13. $('#'+id).fadeIn(1000);
  14. $('#'+id).show("slow");
  15. }
  16.  
  17. $(document).ready(function() {
  18. var i = 1;
  19. var last_visible = 1;
  20. var number = $('#tabs').children().size()
  21. setInterval(function() {
  22. if(i == number) {
  23. i = 1;
  24. last_visible = number;
  25. } else{
  26. last_visible = i;
  27. i++;
  28. }
  29.  
  30. $('#tabs'+last_visible).fadeOut('slow', function(){$('#tabs'+i).fadeIn('slow')});
  31.  
  32.  
  33.  
  34. }, 3000);
  35. });


  1. .tab-content {
  2. display: none;
  3. padding-top: 7px;
  4. color: #ffffff;
  5. font-size: 100%;
  6. }
  7. .sd-buttons {
  8. list-style: none;
  9. font-weight: bold;
  10. font-size: 11px;
  11. }
  12.  
  13. ul.sd-buttons li {
  14. display: inline;
  15. width: 21px;
  16. height: 21px;
  17. background: #000;
  18. padding: 10px;
  19. }
  20.  
  21. ul.sd-buttons li a {
  22. color: #fff;
  23. }
  24. #slider {
  25. z-index: 100;
  26. position: absolute;
  27. top: 48%;
  28. left: 31%;
  29. right: 31%;
  30. font-size: 140%;
  31. color: #ffffff;
  32. text-align: center;
  33. font-weight: normal;
  34. opacity:0.8;
  35. padding:15px;
  36. background-color:#9CC342;
  37. }