javascript - Gridstack undefined when calling $(".grid-stack").data("gridstack") in global context -


gridstack javascript library can found here. don't know whether need define grid within original function created, can't seem call gridstack , defined. how call gridstack in context want below? thank in advance.

$("#button").click(function(){   //var el ='<div class="grid-stack-item-content" />test<div/>';  var grid = $(".grid-stack").data("gridstack");  alert(grid); //this undefined   });    $(function () {    var options = {        cell_height: 80,        vertical_margin: 10    };     $('.grid-stack').gridstack(options);    }); 


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -