0

as cake3 is using foundation framework, how can I use the reveal moadl function?

I tried simply copy and paste this to my view:

<p><a data-open="exampleModal1">Click me for a modal</a></p>

<div class="reveal" id="exampleModal1" data-reveal>
  <h1>Awesome. I Have It.</h1>
  <p class="lead">Your couch. It is mine.</p>
  <p>I'm a cool paragraph that lives inside of an even cooler modal. Wins!</p>
  <button class="close-button" data-close aria-label="Close reveal" type="button">
    <span aria-hidden="true">&times;</span>
  </button>
</div>

But when I test it, I don't get any error but also the div is visible and not hidden and the "Click me for a modal" does also nothing.

Do I need to include any further files on order to use this in cake?

user1555112
  • 1,897
  • 6
  • 24
  • 43
  • This has little to do with CakePHP, except -perhaps- for the helpers to load the external libraries (`.js` and `.css` files). Make sure you are loading them. For this purpose, you can use plain HTML for the time being, so that you can do some testing. – Inigo Flores Jan 18 '16 at 12:21
  • As the framework is present, is this only the foundation css? Because, when I include these: https://cdnjs.cloudflare.com/ajax/libs/foundation/6.1.1/foundation.min.js and https://cdn.jsdelivr.net/foundation/6.1.1/js/foundation.reveal.js the modal is still not working? What version of foundation is included in cake? Maybe the 5.x? – user1555112 Jan 18 '16 at 12:29
  • Cake3s default baked views and templates are based on Zurb Foundation, you can use whatever you want in your project. – floriank Jan 18 '16 at 12:43

0 Answers0