Javascript 这是什么Jquery插件?
当用户将鼠标悬停在研究、品牌战略、观众参与度等项目上时,底部部分的背景颜色会通过内联样式发生变化 我想知道,这是怎么做到的,或者他们使用的是哪个Jquery插件Javascript 这是什么Jquery插件?,javascript,jquery,Javascript,Jquery,当用户将鼠标悬停在研究、品牌战略、观众参与度等项目上时,底部部分的背景颜色会通过内联样式发生变化 我想知道,这是怎么做到的,或者他们使用的是哪个Jquery插件 非常感谢 这不是一个插件,这是通过好的老式普通jQuery完成的: <div class='something'>my text goes here blah blah blah</div> <div class='somethingelse'>my background color goes he
非常感谢 这不是一个插件,这是通过好的老式普通jQuery完成的:
<div class='something'>my text goes here blah blah blah</div>
<div class='somethingelse'>my background color goes here</div>
根据需要,您可以用多种不同的方式设置HTML。然后,您可以使用任何合适的函数来查找关联的DIV,并相应地操作它的CSS。这不是一个插件,这是通过好的普通jQuery完成的:
<div class='something'>my text goes here blah blah blah</div>
<div class='somethingelse'>my background color goes here</div>
根据需要,您可以用多种不同的方式设置HTML。然后,您可以使用任何合适的函数来查找关联的DIV并相应地操作其CSS。它不是一个插件:
// global nav effect
$('#global_header li').hover(function(){
$('div.marker',$(this)).animate({height:3}, 90)
},function(){
if(false == $(this).hasClass('active'))
{
$('div.marker',$(this)).animate({height:0}, 90)
}
})
$('#global_header li').click(function(){
$('div.marker',$(this)).addclass('active')
})
这就是它的全部功能。它使用hover()和animate()
好的,这是全局标题的脚本,但它的作用大致相同,只是影响了不同的部分。它不是一个插件:
// global nav effect
$('#global_header li').hover(function(){
$('div.marker',$(this)).animate({height:3}, 90)
},function(){
if(false == $(this).hasClass('active'))
{
$('div.marker',$(this)).animate({height:0}, 90)
}
})
$('#global_header li').click(function(){
$('div.marker',$(this)).addclass('active')
})
这就是它的全部功能。它使用hover()和animate()
好的,这就是全局标题的脚本,但它的作用大致相同,只是影响了不同的部分。要使用jQuery设置背景色动画,请使用。要使用jQuery设置背景色动画,请使用。使用标准jQuery不能在两种背景色之间褪色-您需要使用插件,就像我的回答一样。你不能用标准的jQuery在两种背景色之间褪色-你需要使用插件,就像我的回答一样。我不知道!谢谢你的提示,我不知道!谢谢你的提示。