Uncaught TypeError: $(...).customFileInput is not a function 2022-06-10 05:18 183阅读 0赞 1、错误描述 demo.js:214 Uncaught TypeError: $(...).customFileInput is not a function at HTMLDocument.<anonymous> (demo.js:214) at f (jquery-1.9.0.min.js:1) at Object.fireWith [as resolveWith] (jquery-1.9.0.min.js:1) at Function.ready (jquery-1.9.0.min.js:1) at HTMLDocument.xt (jquery-1.9.0.min.js:1) (anonymous) @ demo.js:214 f @ jquery-1.9.0.min.js:1 fireWith @ jquery-1.9.0.min.js:1 ready @ jquery-1.9.0.min.js:1 xt @ jquery-1.9.0.min.js:1 2、错误原因 $(function () { //####### Buttons $('button,.button,#sampleButton').button(); // Buttonset $('#radioset').buttonset(); $("#format").buttonset(); //####### Toolbar $("#play, #shuffle").button(); $("#repeat").buttonset(); //####### Accordion $("#menu-collapse").accordion({ header: "h3" }); // Dialog Link $('#dialog_link').click(function () { $('#dialog_simple').dialog('open'); return false; }); // Modal Link $('#modal_link').click(function () { $('#dialog-message').dialog('open'); return false; }); //hover states on the static widgets $('#dialog_link, #modal_link, ul#icons li').hover( function () { $(this).addClass('ui-state-hover'); }, function () { $(this).removeClass('ui-state-hover'); } ); // Dialog Simple $('#dialog_simple').dialog({ autoOpen: false, width: 600, buttons: { "Ok": function () { $(this).dialog("close"); }, "Cancel": function () { $(this).dialog("close"); } } }); //####### Dialogs $("#dialog-message").dialog({ autoOpen: false, modal: true, buttons: { Ok: function () { $(this).dialog("close"); } } }); // Remove focus from buttons $('.ui-dialog :button').blur(); //####### Tabs $('#tabs2, #tabs, #tabs3').tabs(); // Dynamic tabs var tabTitle = $( "#tab_title" ), tabContent = $( "#tab_content" ), tabTemplate = "<li><a href='#{href}'>#{label}</a> <span class='ui-icon ui-icon-close'>Remove Tab</span></li>", tabCounter = 2; var tabs = $( "#tabs2" ).tabs(); // modal dialog init: custom buttons and a "close" callback reseting the form inside var dialog = $( "#dialog2" ).dialog({ autoOpen: false, modal: true, buttons: { Add: function() { addTab(); $( this ).dialog( "close" ); }, Cancel: function() { $( this ).dialog( "close" ); } }, close: function() { form[ 0 ].reset(); } }); // addTab form: calls addTab function on submit and closes the dialog var form = dialog.find( "form" ).submit(function( event ) { addTab(); dialog.dialog( "close" ); event.preventDefault(); }); // actual addTab function: adds new tab using the input from the form above function addTab() { var label = tabTitle.val() || "Tab " + tabCounter, id = "tabs-" + tabCounter, li = $( tabTemplate.replace( /#\{href\}/g, "#" + id ).replace( /#\{label\}/g, label ) ), tabContentHtml = tabContent.val() || "Tab " + tabCounter + " content."; tabs.find( ".ui-tabs-nav" ).append( li ); tabs.append( "<div id='" + id + "'><p>" + tabContentHtml + "</p></div>" ); tabs.tabs( "refresh" ); tabCounter++; } // addTab button: just opens the dialog $( "#add_tab" ) .button() .click(function() { dialog.dialog( "open" ); }); // close icon: removing the tab on click $( "#tabs2" ).on( "click",'span.ui-icon-close', function() { var panelId = $( this ).closest( "li" ).remove().attr( "aria-controls" ); $( "#" + panelId ).remove(); tabs.tabs( "refresh" ); }); //Combination examples (tabs) and open dialog $('#sampleButton').on('click', function(event){ event.preventDefault(); $('#dialog_simple').dialog({ autoOpen: true, modal: true, width: 600, buttons: { "Save": function () { $(this).dialog("close"); }, "Cancel": function () { $(this).dialog("close"); } } }); }); //####### Datepicker $('#datepicker').datepicker({ inline: true }); //####### Slider // Horizontal slider $('#h-slider').slider({ range: true, values: [17, 67] }); // Vertical slider $("#v-slider").slider({ orientation: "vertical", range: "min", min: 0, max: 100, value: 60, slide: function (event, ui) { $("#amount").val(ui.value); } }); $("#amount").val($("#v-slider").slider("value")); // Autocomplete var availableTags = ["ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme"]; $("#tags").autocomplete({ source: availableTags }); //####### Menu $("#menu").menu(); //####### Spinner var spinner = $( "#spinner" ).spinner(); $( "#disable" ).click(function() { if ( spinner.spinner( "option", "disabled" ) ) { spinner.spinner( "enable" ); } else { spinner.spinner( "disable" ); } }); $( "#destroy" ).click(function() { if ( spinner.data( "ui-spinner" ) ) { spinner.spinner( "destroy" ); } else { spinner.spinner(); } }); $( "#getvalue" ).click(function() { alert( spinner.spinner( "value" ) ); }); $( "#setvalue" ).click(function() { spinner.spinner( "value", 5 ); }); //####### Tooltip $( "#tooltip" ).tooltip(); // File input (using http://filamentgroup.com/lab/jquery_custom_file_input_book_designing_with_progressive_enhancement/) $('#file').customFileInput({ button_position : 'right' }); //####### Wijmo $("#menu1").wijmenu({ trigger: ".wijmo-wijmenu-item", triggerEvent: "click" }); // Select a Date Range with datepicker $( "#rangeBa" ).datepicker({ defaultDate: "+1w", changeMonth: true, numberOfMonths: 3, onClose: function( selectedDate ) { $( "#rangeBb" ).datepicker( "option", "minDate", selectedDate ); } }); $( "#rangeBb" ).datepicker({ defaultDate: "+1w", changeMonth: true, numberOfMonths: 3, onClose: function( selectedDate ) { $( "#rangeBa" ).datepicker( "option", "maxDate", selectedDate ); } }); }); 上述js代码: $('#file').customFileInput({ button_position : 'right' }); 3、解决办法
相关 Uncaught TypeError: xxx is not a function 原文地址:[https://blog.csdn.net/u011870547/article/details/52765811][https_blog.csdn.net_u01 ╰半夏微凉°/ 2023年11月22日 06:51/ 0 赞/ 21 阅读
相关 Uncaught (in promise) TypeError: canvas.getContext is not a function 被渲染的canvas标签,必须是`canvas`… 以下是好的 <canvas id="the-canvas" ></canvas> 以下是不可以的 < 秒速五厘米/ 2022年12月29日 06:37/ 0 赞/ 130 阅读
相关 Uncaught TypeError: XXX.getTime is not a function 因为变量只是字符串,无法调用日期函数。 你应该解析它们以获得一个`Date`对象,对于该格式我总是使用以下函数: // parse a date in yyyy-m 淡淡的烟草味﹌/ 2022年09月27日 09:16/ 0 赞/ 305 阅读
相关 Uncaught TypeError: $(...).customFileInput is not a function 1、错误描述 demo.js:214 Uncaught TypeError: $(...).customFileInput is not a function 你的名字/ 2022年06月10日 05:18/ 0 赞/ 184 阅读
相关 TypeError: $(...).form is not a function 这两天在做图片上传的时候遇到了一个问题,通过$(...).form初始化form表单时总是报TypeError: $(...).form is not a function 红太狼/ 2022年06月05日 06:38/ 0 赞/ 104 阅读
相关 Uncaught TypeError: c(...).off is not a function(… layer.open({ title: 'test', content: 'hello layer' }) 运行上面的代码,能弹出对话框,但按确定对话框不消失. 控制 喜欢ヅ旅行/ 2022年05月29日 13:05/ 0 赞/ 290 阅读
相关 Uncaught TypeError: document.getElementsById is not a function document.write和innerHTML的区别 1.innerHTML <p>标题:写在时光里的旧故事</p> <div id="sg">你好,时 曾经终败给现在/ 2022年05月12日 08:22/ 0 赞/ 156 阅读
相关 Uncaught TypeError: mui(...).scroll(...).scrollTo is not a function mui的scroll组件很好用 ![20190125101331288.gif][] 当我想让其自动回滚到顶点时,看文档是这样[http://dev.dcloud.net. 矫情吗;*/ 2022年04月23日 07:46/ 0 赞/ 463 阅读
相关 Uncaught TypeError: b.nodeName.toLowerCase is not a function 1、错误描述 ![watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0 迷南。/ 2022年04月13日 14:09/ 0 赞/ 399 阅读
相关 Uncaught TypeError: form.render is not a function 引言:一直报这个错误,刚开始不知道哪里的问题,后来才明白原来是,引入的layui.js跟引入jquery的包产生了冲突。 把引入的js包注释掉就可以了,不会产生冲突了。 < 我会带着你远行/ 2021年09月22日 23:14/ 0 赞/ 345 阅读
还没有评论,来说两句吧...