Menu icon Foundation
Issue with REVEAL in Foundation 5.1.1

Just downloaded foundation 5.1.1 Been using Foundation since foundation 3 so not a newbie . . . unpacked into web directory made a kitchen sink to test all aspects for foundation and REVEAL is not working followed all instructions even tried to fire on page load with jquery all i get is the darkened screen but no modal box same thing happened when I tried 5.0.3 . . .Seen this issue mainly with ajax content . . .has something changed I don't know about.?

This is the error recorded by firebug lite

Uncaught TypeError: Cannot read property 'css' of undefined foundation.min.js:8
Foundation.libs.reveal.open foundation.min.js:8
(anonymous function) foundation.min.js:8
ab.event.dispatch jquery.js:25
q.handle jquery.js:24
DONT WANT TO HAVE TO LINK EACH INDIVIDUAL .JS EITHER

Foundation1

Foundation2

reveal

Just downloaded foundation 5.1.1 Been using Foundation since foundation 3 so not a newbie . . . unpacked into web directory made a kitchen sink to test all aspects for foundation and REVEAL is not working followed all instructions even tried to fire on page load with jquery all i get is the darkened screen but no modal box same thing happened when I tried 5.0.3 . . .Seen this issue mainly with ajax content . . .has something changed I don't know about.?

This is the error recorded by firebug lite

Uncaught TypeError: Cannot read property 'css' of undefined foundation.min.js:8
Foundation.libs.reveal.open foundation.min.js:8
(anonymous function) foundation.min.js:8
ab.event.dispatch jquery.js:25
q.handle jquery.js:24
DONT WANT TO HAVE TO LINK EACH INDIVIDUAL .JS EITHER

Foundation1

Foundation2
Jason Demitri over 5 years ago

Seem to have fixed with simply amending the initialization script from

$(document).foundation();

to

$(document).ready(function(){
$(document).foundation();
});

Possible Error in the coding or something Zurb ?

Remco Boerma over 5 years ago

Had something similar. After i ajax loaded some new html fragment with modals in it i'd get the same error when activating the modal. This is what fixed it for me (thanks Jason for the inspiration).
in the onsuccess of the ajax load:

$('#newscontainer').foundation();