Formatting A Title For Fancybox
I don't know javascript at all, but I am trying to format my titles/captions for my pictures that are being displayed using FancyBox. In my title attribute in my tag, I h
Solution 1:
You can break your title in two lines like that:
'titleFormat': function(title, currentArray, currentIndex, currentOpts){
temp=title.split('|');
if(!temp[1]){temp[1]=""};
return'<div>'+temp[0]+'</div><div>'+temp[1]+'</div>'
},
As you can see I am spliting the title by addition of '|' character, which need to be added to your title text, but you can do it differently. Also, in this simple example the formatting such as background etc is lost but that you can fix it easily.
good luck
K
Post a Comment for "Formatting A Title For Fancybox"