我的小代码问题无法按我的意愿工作。我将首先发布代码。
$(function() {
$(document).ready(function(){
if( $( "#skillelementwithme" ).hasClass( "skillelement_collapsed" ) )
{
$( "#skillelementwithme" ).click(function() {
$( "#skillelementwithme" ).toggleClass( "skillelement_active_withme", 500 );
$( "#skillelementwithyou" ).fadeTo( 1000, 0 );
});
}
else if (( "#skillelementwithme" ).hasClass( "skillelement_active_withme" ))
{
$( "#skillelementwithme" ).click(function() {
$( "#skillelementwithme" ).toggleClass( "skillelement_collapsed", 500 );
$( "#skillelementwithyou" ).fadeTo( 1000 , 1 );
});
}
})
});
现在虽然淡入淡出效果非常好,但我无法让“skillelementwithyou”类淡入淡出变得不透明。也许我理解这些功能绝对有问题。我希望你们能帮助我。可能它只是很小的东西,我会恨自己。