Flux-Slider
                                
                                 Flux-Slider copied to clipboard
                                
                                    Flux-Slider copied to clipboard
                            
                            
                            
                        Captions with HTML formatting
I think it will be much better if we could be able to use HTML formatted text in captions. For example i want that my captions contain some heading, some small description and hyper link. But if the Flux read the caption's content from the img title attribute it is almost impossible. Of course we can use something like that : <img src="..." title="<h1>Some Heading</h1>.." but it is not really comfortable ;)
I see what you're saying, I think its an issue of simplicity vs functionality though. I really like the simplicity of using title as its semantically correct and doesn't require extra markup.
It might be appropriate to offer both? So Flux reads from title unless the rel is set, e.g.
<img src="http://..." alt="" rel="advancedcaption[captionid]" />
Where captionid is the id of a DOM element to use, for example:
<div id="captionid">
    <h1>Header</h1>
    <p>This is some extra info with a <a href="#">link</a></p>
</div>
I'd be interested to hear what others think?
Yes right, the both versions will be great, you can make some var in configuration, something like "captionsFromRel : true". By the way the "rel" attribute is already obsolete in HTML5 and the site will not be validated when using rel, it is better to use "data-..." attributes. But there is another option, i saw it somewhere ;) ... Every image (slide) has its own index number, so you can read captions from some container based on their index numbers like:
<div id="slider">
    <img src="img/avatar.jpg" alt="" />
    <img src="img/ironman.jpg" alt="" title="Ironman Screenshot" />
    <a href=""><img src="img/imagewithlink.jpg" alt="" /></a>
    <img src="img/tron.jpg" alt="" />
</div>
<div id="captions">
  <div>Any HTML of First caption</div>
  <div> ... </div>
  <div> ... </div>
  <div>Any HTML of last caption</div>
</div>
                                    
                                    
                                    
                                
So, a year have past can we use captions with HTML formatting now? Thanks.
Hi, this is not something I'm looking to add in the short term but feel free to fork the repo and add it for your own project needs.