-
Reply
I'm having an issue using Reveals dynamically. I have a link that is clicked. An ajax request is fired from that click with certain parameters. Raw JSON is then parsed by Handlebars into HTML. This HTML is then passed to a function I created to open the Reveal. The HTML is fine, but the Reveal never pops up. I get the following error in Firebug:
TypeError: s is undefined
...orm":"","-webkit-transition-duration":"","-moz-transition-duration":"","-o-trans...
foundation.min.js (line 9)
Can anyone show me what I'm doing wrong? Or perhaps an alternate way of doing what I'm trying to do?
$('#life li a').click(function(e){ e.preventDefault(); var lifeCat = $(this).attr('href'), cat = lifeCat.replace('#', ''), query = 'c='+cat; Site.Funcs.ajaxCall('life', query, function(data){ var html = Site.Funcs.templateCall(data); Site.Funcs.popLoad(cat+'_questions', html); }); }); ... popLoad: function(id, html){ $('body').append('<div id="'+id+'" class="reveal-modal" data-reveal>' + html + '<a class="close-reveal-modal">×</a></div>'); $('#'+id).foundation('reveal', 'open'); }, ...
According to the F6 Sites / Reveal doc the call is:
WFM