Dynamic grid in modal window


I'm trying to add a dynamic grid inside a modal window, and it doesn't work (neither the data-uk-grid-margin).

Is there a way to make it work, or the only solution is :

  1. display the grid in a new page instead of the modal window
  2. display a basic grid without uk data

Ican survive to this if there is no other solution 😉

Hey Alex,

What you could do is fire it manually once the modal even open even is firing. So something like that:

$( '.yourModalSelector' ).on( {
    'show.uk.modal': function() {
        UIkit.grid( 'yourElement', { /* options */ } );
} );

Have fun,

Thank you! for the moment, i have managed to have all the boxes with the same height, but it will be usefull if it changes. and if i want to implement the parallax i have also to do it the same way, or for any js element that i want to have to the grid (scrollspy for ex) ?

Write a reply

Login or register to write a reply, it's free!