jQuery datepicker 下一个/上一个图像 [英] jQuery datepicker next/prev images

查看:31
本文介绍了jQuery datepicker 下一个/上一个图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为下个月/上个月按钮设置自定义图像.我尝试使用 datepicker 的 prevText/nextText 选项将 span 与我自己的 css 类定义一起放置,但它会将其添加到链接标题中,因此它是无效的 HTML.

I'm trying to set custom images for next / prev month buttons. I tried to use prevText / nextText options of datepicker to put span with my own css class definition, but it adds it to links title, so it's invalid HTML.

我不想在 jQuery UI CSS 中更改 .ui-icon-circle-triangle-w 和 .ui-widget-header .ui-icon 规则...我只想添加/更改渲染的类位于 a 内部的 span 元素.

I don't want to change .ui-icon-circle-triangle-w and .ui-widget-header .ui-icon rules in jQuery UI CSS...i just want to add / change the class for rendered span element that is inside of a.

推荐答案

在自定义 ID 或类中包含您的日期选择器,然后更改 .ui-icon 类的背景:

Contain your datepicker in a custom ID or class, then change the background on the .ui-icon class:

#my-calendar-id .ui-datepicker-next .ui-icon  {background:url('my_image'); }

在使用 jQuery UI CSS 堆栈时,特殊性是关键.

Specificity is key when working with the jQuery UI CSS stack.

这篇关于jQuery datepicker 下一个/上一个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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