2012-10-29 28 views
0

我想在這個jQuery插件中實現html jQuery Drop Captions Plugin 因此,我可以自定義標題文本,默認情況下它只需要標題屬性,但相反,我想從細節div中插入文本並插入它在標題中有沒有這個機會?謝謝!jQuery Drop字幕插件

<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> 

回答

0

是有,在dropcaptions.js更換線33:

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

有:

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

這需要從相鄰的DIV文本(如您的發佈例子)