开发者

ContentFlow Javascript - Success Using Content Other Than Images?

I'd like to use the ContentFlow Javascript tool to display TEXT and other types of HTML rather than images. The documentation says it's possible but I have yet to discover how it works. Check out my test page which just doesn't load when the content is something other than images. Code from this page follows. Any thoughts?

<Html>

    <script language="JavaScript" type="text/javascript" src="contentflow.js"></script>


    <div class="ContentFlow">
        <div class="loadIndicator"><div class="indicator"></div><开发者_运维知识库/div>
        <div class="flow">
            <div class="item" src="" title="">test content</div>
            <img class="item" src="http://jquery.bassistance.de/plugins/thickbox/images/plant4.jpg" title="Your_Image_Title"/>
    <img class="item" src="http://www.wired.com/images/article/magazine/1705/st_alphageek_f.jpg" title="Your_Image_Title"/>
            <img class="item" src="http://jquery.bassistance.de/plugins/thickbox/images/plant4.jpg" title="Your_Image_Title"/>
    <img class="item" src="http://www.wired.com/images/article/magazine/1705/st_alphageek_f.jpg" title="Your_Image_Title"/>
            <img class="item" src="http://jquery.bassistance.de/plugins/thickbox/images/plant4.jpg" title="Your_Image_Title"/>
        </div>
        <div class="globalCaption"></div>
        <div class="scrollbar"><div class="slider"><div class="position"></div></div></div>
    </div>


I had the same problem. What you have to do is put an inner div inside the ".item" div like this:

<div class="item"><div class="content">Text content to display</div></div>

As a caution, the docs say that the ".item" container itself will be scaled to be a particular size, but the text will NOT be scaled...sometimes leads to funny-looking stuff if you don't watch it carefully.


I think it should be as simple as the following:

<div class="ContentFlow">
    <div class="loadIndicator"><div class="indicator"></div></div>
    <div class="flow">
        <div class="item">test content</div>
        <div class="item">test content2</div>
        <div class="item">test content3</div>
        <div class="item">test content4</div>
        <div class="item">
            <a href="http://stackoverflow.com">
              <span>this is also test content</span>
            </a>
        </div>
    </div>
    <div class="globalCaption"></div>
    <div class="scrollbar"><div class="slider"><div class="position"></div></div></div>
</div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜