47 lines
1.1 KiB
PHP
47 lines
1.1 KiB
PHP
<html>
|
|
<head>
|
|
<link rel="stylesheet" type="text/css" href="assets/css/jquery.gridster.css">
|
|
<link rel="stylesheet" type="text/css" href="assets/demo.css">
|
|
</head>
|
|
|
|
<body>
|
|
<div class="gridster">
|
|
<ul></ul>
|
|
</div>
|
|
|
|
<script type="text/javascript" src="assets/jquery.js"></script>
|
|
<script src="asset/jquery.gridster.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
<script type="text/javascript" id="code">
|
|
var gridster;
|
|
|
|
$(function(){
|
|
|
|
gridster = $(".gridster > ul").gridster({
|
|
widget_margins: [5, 5],
|
|
widget_base_dimensions: [100, 55]
|
|
}).data('gridster');
|
|
|
|
var widgets = [
|
|
['<li>0</li>', 1, 1],
|
|
['<li>1</li>', 1, 1],
|
|
['<li>2</li>', 1, 1],
|
|
['<li>3</li>', 1, 1],
|
|
['<li>4</li>', 1, 1],
|
|
['<li>5</li>', 1, 1],
|
|
['<li>6</li>', 1, 1],
|
|
['<li>7</li>', 1, 1],
|
|
['<li>8</li>', 1, 1],
|
|
['<li>9</li>', 1, 1],
|
|
['<li>10</li>', 1, 1]
|
|
];
|
|
|
|
$.each(widgets, function(i, widget){
|
|
gridster.add_widget.apply(gridster, widget)
|
|
});
|
|
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|