2009-09-21 3 views
0

나는 초보자이며 이것에 잠시 고생하고 있습니다. 스크롤 div 안에 sIFR 3 텍스트가있는 jQuery Cycle Plugin을 사용하여 스크롤 div를 만들려고합니다. Firefox에서 제대로 작동하도록 할 수 있습니다. 어떤 제안이나 도움을 주시면 대단히 감사하겠습니다! http://dev.bandspecial.com/test.htmlsIFR 3은 jQuery Cycle Plugin과 호환됩니까?

jQuery를 :

$(document).ready(function() { 
$('#slideshow').cycle({ 
    fx: 'scrollLeft', 
    cleartypeNoBg: true 
}); 
}); 

또는 sIFR :

sIFR.replace(rockwell, { 
selector: 'h1', 
     css: [ '.sIFR-root { color:#ffffff; }' ,'a { text-decoration: none }' ,'a:link { color: #E31824 }' ,'a:hover { color: #E31824 }' ], wmode: 'transparent' 
    }); 

바디 코드 : 여기

내 링크의

<div id="slideshow"> 
    <div> <img src="http://malsup.com/jquery/cycle/images/beach1.jpg" height="200" width="200"> 
    <h1>St Andrews State Park - Panama City, FL</h1> 
    <p>This park is one of the most popular outdoor recreation spots in Florida. </p> 
    </div> 
    <div> <img src="http://malsup.com/jquery/cycle/images/beach2.jpg" height="200" width="200"> 
    <h1>Located in the Florida panhandle,</h1> 
    <p> the 1,260 acre park is situated on a scenic peninsula and is well known for its sugar white sands and brilliant blue water. </p> 
    </div> 
    <div> <img src="http://malsup.com/jquery/cycle/images/beach3.jpg" height="200" width="200"> 
    <h1>The ocean provides opportunity for endless fun. </h1> 
    <p>From boogie boarding to snorkeling to swimming and boating, there is always something to do.</p> 
    </div> 
</div> 
+0

지금까지 어떤 코드가 있습니까? –

+0

위의 코드와 링크를 추가했습니다. –

답변

0

만약 당신이 숨겨진 당신은 div의 디스플레이를 가지고 스크롤하려고 : none; 페이지로드시 sifr은 해당 텍스트를 대체하지 않습니다.

1

변경 사항이 약간 다를 수 있으므로 Innerfade Jquery 플러그인을 사용합니다. 여기

내가 무슨 짓을 :

Innerfade이 목록에있는 모든 항목을 숨길 .hide()를 사용합니다. 이것이 문제의 근원입니다. 해결 방법 : 플러그인을 .hide() 개로 사용하는 대신 .addClass("hide")을 사용하고 CSS position: absolute; left:-10000px을 정의하십시오.

이 방법을 사용하십시오. .removeClass("hide") 귀하의 게시물이 다시 표시됩니다. 이 외에도 페이드 나 슬라이드 같은 효과를 사용한다면 removeClass을 잊지 마세요.

나는 이것이 의미가 있기를 바랍니다. BTW :

$(document).ready(function(){ 
    $('#div').cycle({ 
     fx: 'fade', 
     after: function(){ 
      sIFR.replace(alberta, { 
      selector: '.flash-text', 
      wmode: 'transparent' 
      }); 
     } 
    }); 
}); 
0

또는 sIFR 3를 사용하고 난 한때 각 전환이 완료된 또는 sIFR 함수를 호출하는 '후'JQuery와주기 옵션을 사용했습니다. 그의 코드가 저에게 효과적 일지라도, (페이드) 효과 후에 시각적으로 sifr을 렌더링합니다. before 및 display 블록을 사용하면 sifr이 효과 이전에보다 바람직한 결과를 위해 렌더링됩니다.

$(document).ready(function(){ 
    $('#div').cycle({ 
     fx: 'fade', 
     before: function(){ 
      $(this).css({ 'display': 'block' }) 
      sIFR.replace(alberta, { 
      selector: '.flash-text', 
      wmode: 'transparent' 
      }); 
     } 
    }); 
}); 
2

나는 톰의 코드를 약간 조정 : 나는