Created
July 29, 2011 14:30
-
-
Save aphoenix/1113914 to your computer and use it in GitHub Desktop.
The HTML that is generated by fancyTitle does not seem to get the behaviour for #fancyplay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fancyTitle(title, currentArray, currentIndex, currentOpts) { | |
return '<div id="fancydescription">' + (title && title.length ? '<span>' + title + ' </span>' : '' ) + '</div><div id="fancycount">Image ' + (currentIndex + 1) + ' of ' + currentArray.length + '</div><div id="fancycontrols"><a href="#" id="fancyplay">Play</a> <a href="#" id="fancypause"> Pause</a></div><div style="clear:both;"></div>'; | |
} | |
$('.fancybox').fancybox({ | |
'titleFormat' : fancyTitle, | |
'cyclic' : true, | |
'overlayColor' : '#000', | |
'overlayOpacity' : 0.5 | |
}); | |
$('#fancyplay').live('click',function(event) { | |
//Do something | |
alert('Vas is los?') | |
event.preventDefault(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment