Revision: 40032
Updated Code
at January 25, 2011 08:57 by davidcfox
Updated Code
FancyBox Split Title Attribute and Format Output jQuery('#selector').fancybox({ 'titlePosition' : 'inside', 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { var splitTitle = title.split('-'); //return your text in whatever format you need return '<div style="color:red;">' + splitTitle[0] + '</div>'; } });
Revision: 40031
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 25, 2011 07:10 by davidcfox
Initial Code
FancyBox Split Title Attribute and Format Output jQuery('#selector').fancybox({ 'titlePosition' : 'inside', 'titleFormat' : function(title, currentArray, currentIndex, currentOps) { var splitTitle = jQuery('').attr('title').split('-'); //return your text in whatever format you need return '<div style="color:red;">' + splitTitle[0] + '</div>'; } });
Initial URL
Initial Description
This is the code necessary to grab the title attribute from the link/images selected and then parse it for use in the title field of a FancyBox popup.
Initial Title
FancyBox Split Title Attribute and Format Output
Initial Tags
jquery
Initial Language
jQuery