Updated sample

This commit is contained in:
Dustin Moore
2013-04-03 09:44:16 -07:00
parent 3cc9485ae0
commit 412ee61bbe
2 changed files with 8 additions and 9 deletions

View File

@ -35,7 +35,7 @@ body {
opacity: 1; opacity: 1;
} }
.gridster, .content { .gridster, .content, .gridster2 {
width: 940px; width: 940px;
margin: 0 auto; margin: 0 auto;
@ -56,27 +56,27 @@ body {
margin: 25px; margin: 25px;
} }
.gridster .gs_w { .gridster .gs_w, .gridster2 .gs_w {
background: #FFF; background: #FFF;
cursor: pointer; cursor: pointer;
-webkit-box-shadow: 0 0 5px rgba(0,0,0,0.3); -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.3);
box-shadow: 0 0 5px rgba(0,0,0,0.3); box-shadow: 0 0 5px rgba(0,0,0,0.3);
} }
.gridster .player { .gridster .player, .gridster2 .player {
-webkit-box-shadow: 3px 3px 5px rgba(0,0,0,0.3); -webkit-box-shadow: 3px 3px 5px rgba(0,0,0,0.3);
box-shadow: 3px 3px 5px rgba(0,0,0,0.3); box-shadow: 3px 3px 5px rgba(0,0,0,0.3);
} }
.gridster .gs_w.try { .gridster .gs_w.try, .gridster2 .gs_w.try {
background-image: url(../img/sprite.png); background-image: url(../img/sprite.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 37px -169px; background-position: 37px -169px;
} }
.gridster .preview-holder { .gridster .preview-holder, .gridster2 .preview-holder {
border: none!important; border: none!important;
border-radius: 0!important; border-radius: 0!important;
background: rgba(255,255,255,.2)!important; background: rgba(255,255,255,.2)!important;

View File

@ -23,13 +23,13 @@
$(".gridster ul").gridster({ $(".gridster ul").gridster({
widget_margins: [10, 10], widget_margins: [10, 10],
widget_base_dimensions: [140, 140], widget_base_dimensions: [140, 140],
max_cols: 6 shift_larger_widgets_down: false
}); });
}); });
</script> </script>
</head> </head>
<body> <body>
<div class="gridster ready"> <div class="gridster">
<ul style="height: 480px; position: relative; "> <ul style="height: 480px; position: relative; ">
<li data-row="1" data-col="1" data-sizex="2" data-sizey="1" class="gs_w"></li> <li data-row="1" data-col="1" data-sizex="2" data-sizey="1" class="gs_w"></li>
<li data-row="3" data-col="1" data-sizex="1" data-sizey="1" class="gs_w"></li> <li data-row="3" data-col="1" data-sizex="1" data-sizey="1" class="gs_w"></li>
@ -51,7 +51,6 @@
<div class="content"> <div class="content">
<p>This demo represents using the branch in swap mode. This works best with shift_larger_widgets_down set to "false". However, smaller widgets do not displace larger ones.</p> <p>This demo represents using the branch in swap mode. This works best with shift_larger_widgets_down set to "false". However, smaller widgets do not displace larger ones.</p>
<p>For now, if you want the default shift down behavior I recommend using the standard gridster library.</p>
</div> </div>
</body> </body>
</html> </html>