Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/70.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 jPicker-破碎图像_Javascript_Jquery_Python_Django_Jquery Plugins - Fatal编程技术网

Javascript jPicker-破碎图像

Javascript jPicker-破碎图像,javascript,jquery,python,django,jquery-plugins,Javascript,Jquery,Python,Django,Jquery Plugins,我正在使用Django和jquery,在我的web应用程序中实现jPicker。在这里,我在jPicker彩色显示器上得到了破碎的图像。当我检查服务器代码时,它显示如下 "GET /files/css/jPicker-1.1.6.min.css HTTP/1.1" 304 0 "GET /files/css/jPicker.css HTTP/1.1" 304 0 "GET /files/js/jquery-1.7.1.min.js HTTP/1.1" 304 0 "GET /files/js/j

我正在使用Django和jquery,在我的web应用程序中实现jPicker。在这里,我在jPicker彩色显示器上得到了破碎的图像。当我检查服务器代码时,它显示如下

"GET /files/css/jPicker-1.1.6.min.css HTTP/1.1" 304 0
"GET /files/css/jPicker.css HTTP/1.1" 304 0
"GET /files/js/jquery-1.7.1.min.js HTTP/1.1" 304 0
"GET /files/js/jpicker-1.1.6.min.js HTTP/1.1" 304 0
"GET /jPicker/images/mappoint.gif HTTP/1.1" 404 3209
"GET /jPicker/images/rangearrows.gif HTTP/1.1" 404 3218
"GET /jPicker/images/Maps.png HTTP/1.1" 404 3197
"GET /jPicker/images/map-opacity.png HTTP/1.1" 404 3218
"GET /jPicker/images/Bars.png HTTP/1.1" 404 3197
"GET /jPicker/images/bar-opacity.png HTTP/1.1" 404 3218
"GET /jPicker/images/AlphaBar.png HTTP/1.1" 404 3209
"GET /jPicker/images/preview-opacity.png HTTP/1.1" 404 3230
"GET /jPicker/images/NoColor.png HTTP/1.1" 404 3206
没有找到显示404的图像文件,但我正确链接了css文件夹中的图像文件夹

/home/nirmal/try/files/css/images/
/home/nirmal/try/files/css/jPicker.css
/home/nirmal/try/files/css/jPicker-1.1.6.min.css
/home/nirmal/try/files/js/jquery-1.7.1.min.js
/home/nirmal/try/files/js/jpicker-1.1.6.min.js
我的Django设置是

MEDIA_ROOT = '/home/nirmal/try/files/'
MEDIA_URL = 'http://localhost:8000/files/'
我犯了什么错误,使图像出现在jPicker/images上而未被找到


谢谢

jPicker有一个默认变量,说明images文件夹的位置:

 $.fn.jPicker.defaults = /* jPicker defaults - you can change anything in this section (such as the clientPath to your images) without fear of breaking the program */
 {
   images:
   {
      clientPath: '/jPicker/images/', /* Path to image files */
   }
 }
您应该将此默认值覆盖为
images.clientPath='/files/css/images/'
,例如:

<script type="text/javascript">        
  $(document).ready(
    function()
    {
      $('#your-element').jPicker({images:{clientPath: '/files/css/images/'}});
    });
</script>

$(文件)。准备好了吗(
函数()
{
$(“#您的元素”).jPicker({images:{clientPath:'/files/css/images/'});
});
另请参见上的“设置”部分(糟糕的是,我无法链接确切位置,但Ctrl+F是您的朋友)

祝你好运, 不会