當前位置: 首頁>>代碼示例 >>用法及示例精選 >>正文


jQWidgets jqxKanban connectWith屬性用法及代碼示例


jQWidgets是一個 JavaScript 框架,用於為 PC 和移動設備製作基於 Web 的應用程序。它是一個非常強大、優化、獨立於平台且得到廣泛支持的框架。這 jqx看板用於表示項目的看板方法。

與連接屬性用於設置或獲取與另一個指定的連接jqx看板小部件。

用法:

  • 用於設置 connectWith 屬性。

    $('#jqxKanban').jqxKanban({ connectWith: "#jqx_Kanban2" });  
  • 用於獲取 connectWith 屬性。

    var connectWith = $('#jqxKanban').jqxKanban('connectWith');

鏈接文件:下載jQWidgets從給定的鏈接。在 HTML 文件中,找到下載文件夾中的腳本文件。

<link rel=”stylesheet” href=”jqwidgets/styles/jqx.base.css” type=”text/css” />
<script type=”text/javascript” src=”scripts/jquery.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxbuttons.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxsortable.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxkanban.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxdata.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqx-all.js”></script>

例子:下麵的示例說明了 jQWidgets jqxKanban與連接屬性。

HTML


<!DOCTYPE html> 
<html lang="en"> 
  
<head> 
    <link rel="stylesheet" 
          href="jqwidgets/styles/jqx.base.css"
          type="text/css" /> 
    <script type="text/javascript" 
            src="scripts/jquery.js"> 
    </script> 
    <script type="text/javascript" 
            src="jqwidgets/jqxcore.js"> 
    </script> 
    <script type="text/javascript" 
            src="jqwidgets/jqxbuttons.js"> 
    </script> 
    <script type="text/javascript" 
            src="jqwidgets/jqxsortable.js"> 
    </script> 
    <script type="text/javascript" 
            src="jqwidgets/jqxkanban.js"> 
    </script> 
    <script type="text/javascript" 
            src="jqwidgets/jqxdata.js"> 
    </script> 
    <script type="text/javascript" 
            src="jqwidgets/jqx-all.js"> 
    </script> 
</head> 
  
<body> 
    <center> 
        <h1 style="color:green;"> 
            GeeksforGeeks 
        </h1> 
        <h3> 
            jQWidgets jqxKanban connectWith Property 
        </h3> 
        <div id="jqx_Kanban1"></div> 
        <div id="jqx_Kanban2"></div> 
        <script type="text/javascript"> 
            $(document).ready(function () { 
                var Data = new $.jqx.dataAdapter({ 
                    localData: [ 
                        { 
                            status: "new", 
                            Company_Name: "GeeksforGeeks", 
                            About: "It is a CS portal" 
                        } 
                    ], 
                    dataFields: [ 
                        { 
                            map: "About", 
                            name: "tags", 
                            type: "string" 
                        }, 
                        { 
                            map: "Company_Name", 
                            name: "text", 
                            type: "string" 
                        }, 
                        { 
                            name: "status", 
                            type: "string" 
                        }, 
                    ] 
                }); 
                $('#jqx_Kanban1').jqxKanban({ 
                    width: 300, 
                    height: 107, 
                    source: Data, 
                    connectWith: "#jqx_Kanban2", 
                    columns: [ 
                        { 
                            text: "Company", 
                            dataField: "new" 
                        } 
                    ] 
                }); 
                $('#jqx_Kanban2').jqxKanban({ 
                    width: 300, 
                    height: 107, 
                    source: Data, 
                    connectWith: "#jqx_Kanban1", 
                    columns: [ 
                        { 
                            text: "Company", 
                            dataField: "new" 
                        } 
                    ] 
                }); 
            }); 
        </script> 
    </center> 
</body> 
  
</html>

輸出:

參考: https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxkanban/jquery-kanban-api.htm?search=



相關用法


注:本文由純淨天空篩選整理自Kanchan_Ray大神的英文原創作品 jQWidgets jqxKanban connectWith Property。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。