File tree Expand file tree Collapse file tree 5 files changed +1080
-7
lines changed
Expand file tree Collapse file tree 5 files changed +1080
-7
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,11 @@ function mfbfw_defaults() {
117117 'callbackOnComplete ' => 'function() { alert("Complete!"); } ' ,
118118 'callbackOnCleanup ' => 'function() { alert("CleanUp!"); } ' ,
119119 'callbackOnClose ' => 'function() { alert("Close!"); } ' ,
120+ 'copyTitleFunction ' => 'var arr = jQuery("a.fancybox");
121+ jQuery.each(arr, function() {
122+ var title = jQuery(this).children("img").attr("title");
123+ jQuery(this).attr("title",title);
124+ }) ' ,
120125
121126 // Troubleshooting
122127 'nojQuery ' => '' ,
@@ -231,12 +236,9 @@ function mfbfw_init() {
231236<script type="text/javascript">
232237 jQuery(function(){
233238
234- jQuery.fn.getTitle = function() { // Copy the title of every IMG tag and add it to its parent A so that fancybox can show titles
235- var arr = jQuery("a.fancybox");
236- jQuery.each(arr, function() {
237- var title = jQuery(this).children("img").attr("title");
238- jQuery(this).attr("title",title);
239- })
239+ jQuery.fn.getTitle = function() { // Copy the title of every IMG tag and add it to its parent A so that fancybox can show titles ' ;
240+ <?php echo $ settings ['copyTitleFunction ' ]; ?>
241+ echo '
240242 }
241243
242244 // Supported file extensions
You can’t perform that action at this time.
0 commit comments