Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript TypeError:jquery\uu网页包\u导入的\u模块\uu 4\uuuu(…)。slicebox不是函数_Javascript_Jquery - Fatal编程技术网

Javascript TypeError:jquery\uu网页包\u导入的\u模块\uu 4\uuuu(…)。slicebox不是函数

Javascript TypeError:jquery\uu网页包\u导入的\u模块\uu 4\uuuu(…)。slicebox不是函数,javascript,jquery,Javascript,Jquery,我正在尝试切片盒图像。但它总是显示一个错误,而不是一个函数 如何解决此错误 我正在导入以下文件 import '../../ExternalReferences/css/slicebox.css'; import '../../ExternalReferences/css/custom.css'; import '../../ExternalReferences/css/demo.css'; //import { $ } from 'http://code.jquery.com/jque

我正在尝试切片盒图像。但它总是显示一个错误,而不是一个函数

如何解决此错误

我正在导入以下文件

 import '../../ExternalReferences/css/slicebox.css';
 import '../../ExternalReferences/css/custom.css';
 import '../../ExternalReferences/css/demo.css';
 //import { $ } from 'http://code.jquery.com/jquery-latest.pack.js';
 import '../../ExternalReferences/js/jquery.min.js';
 // import '../../ExternalReferences/js/jquery-3.3.1.min.js';
 //import '../../ExternalReferences/js/modernizr.custom.46884.js';
 import '../../ExternalReferences/js/jquery.slicebox.js';
这是我的功能

 $(function() {
      var Page =(function() {

        var $navArrows = $( '#nav-arrows' ).hide(),
          $navDots = $( '#nav-dots' ).hide(),
          $nav = $navDots.children( 'span' ),
          $shadow = $( '#shadow' ).hide(),
         // slicebox = ($( '#sb-slider' )as any).slicebox( {
           // $( '#sb-slider' ).slicebox( {
            //slicebox = (jQuery( '#sb-slider' )as any).slicebox( {
              slicebox=($("#sb-slider")as any). slicebox ({
            onReady : function() {

              $navArrows.show();
              $navDots.show();
              $shadow.show();

                       orientation : 'v';
                        perspective : 1200;
                        cuboidsCount : 5;
                        cuboidsRandom : false;
                        maxCuboidsCount : 5;
                        disperseFactor : 0;
                        colorHiddenSides : '#222';
                        sequentialFactor : 150;
                        Speed : 600;
                        easing : 'ease';
                        autoplay : true;
                        interval: 3000;
                        fallbackFadeSpeed : 300; 

            },
            onBeforeChange : function( pos ) {

              $nav.removeClass( 'nav-dot-current' );
              $nav.eq( pos ).addClass( 'nav-dot-current' );

            }
          } ),
          
          init = function() {

            initEvents();
            
          },
          initEvents = function() {

            // add navigation events
            $navArrows.children( ':first' ).on( 'click', function() {

              slicebox.next();
              return false;

            } );

            $navArrows.children( ':last' ).on( 'click', function() {
              
              slicebox.previous();
              return false;

            } );

            $nav.each( function( i ) {
            
              $( this ).on( 'click', function( event ) {
                
                var $dot = $( this );
                
                if( !slicebox.isActive() ) {

                  $nav.removeClass( 'nav-dot-current' );
                  $dot.addClass( 'nav-dot-current' );
                
                }
                
                slicebox.jump( i + 1 );
                return false;
              
              } );
              
            } );

          };

          return { init : init };

      })();
     
      

      Page.init();
      
    });  
Is its控制台显示错误类型错误:jquery\uu网页包\u导入的模块\uu 4\uuuu(…)。slicebox不是函数

如何解决这个切片框不是函数错误? 可能吗

谢谢,
Dhinesh

您为什么像其他人一样使用
?你不能只做
slicebox=$(“#sb slider”).slicebox({
。还要检查控制台中的网络选项卡,检查jquery.sliderbox.js是否正确加载如果我没有输入任何正在获取的错误“属性'slicebox'在类型'jquery'上不存在”..这就是为什么要输入任何属性的原因。-Dhinesh