我有下面的 JQuery 代码,我需要清除这个动画完成的内联 css
$(document).ready(function(){
$("#panel").hide(); //updated line, removing the #panel ID.
$('#tab2').toggle(function(){ //adding a toggle function to the #tab
$("#panel").show();
$('#ToolsTitleSpan').text("CLOSE TOOLS");
$('#tab2').stop().animate({right: '225'}, 800, 'swing', function() {});
$("#panel").stop().animate({right: '72', width: '230px', opacity:0.8}, 800, 'swing', function() {
$('.contentSideBar').fadeIn('slow');
});
},
function(){ //when the #tab is next cliked
$('#ToolsTitleSpan').text("OPEN TOOLS");
$('#tab2').stop().animate({right: '-=225'}, 800, 'swing', function() {
$('.contentSideBar').fadeOut(slow, function() {});
});
$('#panel').stop().animate({width:"0", position:'absolute', float: 'right', opacity:0.1}, 800, 'swing');
});
});
如果需要,这里是 HTML 代码:
<div id="panelKS"> <!--the hidden panel -->
<div class="contentSideBarKS">
</div>
</div>
<div id="tab2KS">
<span id="ToolsTitleSpanOpenKS">
<img id="bg" src="<?php echo $OUTPUT->pix_url('/buttons/opentools', 'theme')?>"/>
</span>
<span id="ToolsTitleSpanCloseKS">
<img id="bg" src="<?php echo $OUTPUT->pix_url('/buttons/closetools', 'theme')?>"/>
</span>
</div>
你能告诉我如何清除内联css吗?
谢谢