小编der*_*ull的帖子

使用php保存Jquery可拖动DIV的位置

关于如何保存可拖动DIV的位置有很多解决方案,但我没有发现任何有助于在php中使用While循环.

我有一个"需求"数据库,我想显示符合人员用户名和状态= inprogress的所有"需求".这可能是1需要或1,000,000需求,具体取决于是否符合标准.

我想在移动时自动保存需要位置(DIV).这可能吗?如果可以的话,我想使用SQL将值存储在数据库中.

这里我现在的代码显示"需要"(div)


标题

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css" />
  <style>
  #set div { width: 90px; height: 90px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
  #set { clear:both; float:left; width: 368px; height: 120px; }
  p { clear:both; margin:0; padding:1em 0; }
  </style>


<script>
$(function() {
  $( "#set div" ).draggable({ 
    stack: "#set div" 
  });
});


</script>
Run Code Online (Sandbox Code Playgroud)



身体

<div id="set">

<?

$query = mysql_query("SELECT * FROM needs WHERE (needsusername='$username' OR workerusername='$username') …
Run Code Online (Sandbox Code Playgroud)

html php jquery draggable

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

draggable ×1

html ×1

jquery ×1

php ×1