jQueryUI Datepicker上一个和下一个图标未显示 [英] jQueryUI Datepicker prev and next icons not showing

查看:60
本文介绍了jQueryUI Datepicker上一个和下一个图标未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将一个jQuery datepicker合并到我的应用程序中,但是无论我选择哪个主题,上/下一个图标都不会显示.我也使用了不同版本的jquery-ui.js.我尝试了一些以前看到过的项目,例如-使用'hideIfNoPrevNext'或

I have incorporated a jquery datepicker into my application however no matter what theme I select the prev/next icons do not show. I have used a different version of the jquery-ui.js too. I have tried a couple of items I had seen previously posted like - using 'hideIfNoPrevNext' or

 $( ".date" ).datepicker( "option", "changeMonth", true );

一个我找不到的建议是"image"文件夹的位置.我已经看过jquery-ui.js和theme.css.

One suggestion that I cannot find is where the 'image' folder is located. I have looked in the jquery-ui.js and the theme.css.

在我的代码中,我按以下顺序引用文件:

In my code I reference the files in this order:

 <link href="js/ui_1.10.4_themes_smoothness_jquery-ui.css" rel="stylesheet" type="text/css" />
 <script src="js/jquery-1.10.js" type="text/javascript"></script>
 <script src="js/jquery_ui_1.11.4_jquery-ui.js" type="text/javascript"></script>

,并且在主题中将图标引用为:

and in the theme it references the icons as:

.ui-widget-content .ui-icon {
    background-image: url(images/ui-icons_222222_256x240.png);
}
.ui-widget-header .ui-icon {
    background-image: url(images/ui-icons_222222_256x240.png);
}
.ui-state-default .ui-icon {
    background-image: url(images/ui-icons_888888_256x240.png);
}
.ui-state-hover .ui-icon,
.ui-state-focus .ui-icon {
    background-image: url(images/ui-icons_454545_256x240.png);
}
.ui-state-active .ui-icon {
    background-image: url(images/ui-icons_454545_256x240.png);
}
.ui-state-highlight .ui-icon {
    background-image: url(images/ui-icons_2e83ff_256x240.png);
}
.ui-state-error .ui-icon,
.ui-state-error-text .ui-icon {
    background-image: url(images/ui-icons_cd0a0a_256x240.png);
}

推荐答案

在下载 jQuery-UI 时,您应该获取一个zip文件,其中将包含您要查找的images文件夹.这些将需要包含在您的项目中,以便正确显示图标.是否包括这些取决于您用来提供文件的Web服务器的类型.

When downloading jQuery-UI you should get a zip file that will contain the images folder you are looking for. These will need to be including with your project in order for the icons to properly show up. Including these depends on the type of web server you are using to serve your files.

这篇关于jQueryUI Datepicker上一个和下一个图标未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆