json2html, I need to add click events to the resulting html after the transform. right now I am using a timer. Even though it did not appear to be an option i attempted to add the code to the Options for the transform call. Didn't work. Is there a better option than adding a timer to document.ready to give the transform time to run before adding my click event to the resulting divs?
setTimeout(function() {
$('.item').click( function() {
$this = $(this);
$.fancybox({
height: '100%',
href: $this.find('a').attr('href'),
type: 'iframe',
width: '600px'
});
return false;
});
}, 1000);