0

i am trying to implement html in this jquery plugin jQuery Drop Captions Plugin So i can customize the caption text, by default it takes just the title attribute, but instead i want to take the text from the details div and insert it in the caption, its there any chance for this ? thank you!

<pre>
<img alt="image" title="In ac lectus sit amet lacus suscipit commodo non in nunc!      Phasellus vitae arcu dolor, non luctus felis. 
    Quisque ut mauris eget massa lobortis venenatis et at nibh." src="img1.jpg"    width="300" height="199" class="right blacksheep" />
    <div class="details">
        <div class="bigCaption bookreg">Margiela Lookbook<br>
                    S/S 2012</div>
        <div class="buttonCaption mediumreg">Publication digitale</div>
    </div>
</pre>
4

1 に答える 1

0

はい、dropcaptions.js の 33 行目を置き換えます。

var caption = jQuery(obj).attr('title');

と:

var caption = jQuery(obj).next().html();

これは、隣接する div からテキストを取得します (投稿された例のように)

于 2013-02-22T10:54:57.223 に答える