jquery.min.js,footable.min.js,jquery-1.9.1.js和jquery-ui.js不能一起工作

时间:2015-11-05 06:44:19

标签: jquery asp.net jquery-ui gridview jquery-ui-autocomplete

  

在下面的代码中,自动完成 Bootrap 3.0 Gridview Footable 这两项操作都在aspx的同一页面中,但不起作用。   如果它们都包含在页面中,那么它只能用于 gridview footable autocomplete

<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="//cdn.jsdelivr.net/webshim/1.14.5/polyfiller.js"></script>
<script src="../Scripts/Date.js"></script>
<script src="../javascripts/AutoComplete/jquery-1.9.1.js"></script>
<script src="../javascripts/AutoComplete/jquery-ui.js"></script>
<link href="../stylesheets/jquery-ui.css" rel="stylesheet" />
<link href="../stylesheets/Loginmodel.css" rel="stylesheet" />
<script language="javascript" type="text/javascript">
    function pageLoad(sender, args) {
        $(function () {
            $('#<%=txtSearch.ClientID%>').autocomplete({
                source: function (request, response) {
                    $.ajax({
                        url: "StudReg.aspx/GetStudentName",
                        data: "{ 'pre':'" + request.term + "'}",
                        dataType: "json",
                        type: "POST",
                        contentType: "application/json; charset=utf-8",
                        success: function (data) {
                            response($.map(data.d, function (item) {
                                return { value: item }
                            }))
                        },
                        error: function (XMLHttpRequest, textStatus, errorThrown) {
                            alert(textStatus);
                        }
                    });
                }
            });
        });
    }
</script>
<%--  <script type="text/javascript" language="javascript">
    function CopyText() {
        var txt2 = document.getElementById("<%= this.txtPermanentAddress.ClientID %>");
        txt2.value = document.getElementById("<%= this.txtTemporaryAddress.ClientID %>").value;
    }
</script>--%>
<script type="text/javascript">
    function Confirm() {
        var confirm_value = document.createElement("INPUT");
        confirm_value.type = "hidden";
        confirm_value.name = "confirm_value";
        if (confirm("Do you want to Delete data?")) {
            confirm_value.value = "Yes";
        } else {
            confirm_value.value = "No";
        }
        document.forms[0].appendChild(confirm_value);
    }
</script>
<style>
    .required:first-letter {
        color: red;
        font-weight: bold;
    }
</style>
<script src="../Scripts/jquery.min.js"></script>
<script src="../stylesheets/Gridview%20footable/footable.min.js"></script>
<script>

    function pageLoad() {
        $(document).ready(function () {
            $(function () {
                $('[id*=gvSearchStudent]').footable();

            });
        });
    }
    //$(function () {
    //    $('[id*=gvEmployee]').footable();
    //});
</script>
  

请给我一个解决方案。   footable-min.js用于Gridview的响应式设计,Autocomplete用于在文本框中显示文本类型的相关列表。

0 个答案:

没有答案