【发布时间】:2015-01-02 05:00:02
【问题描述】:
我有这个代码。
$(window).bind("scroll", function() {
if ($(this).scrollTop() > a.top -80) {
$(".introHeader").fadeIn();
} else {
$(".introHeader").stop().fadeOut();
}
现在我想更改名为:introHeader 的 div 中文本的字体颜色。 所以:
$(window).bind("scroll", function() {
if ($(this).scrollTop() > a.top -80) {
$(".introHeader").fadeIn();
// Change font color.
} else {
$(".introHeader").stop().fadeOut();
我该如何解决这个问题,
$(window).bind("scroll", function() {
if ($(this).scrollTop() > a.top -80) {
$(".introHeader").fadeIn();
document.getElementById('introHeader').color = '#999999';
} else {
$(".introHeader").stop().fadeOut();
不工作..
【问题讨论】:
标签: javascript fonts