in my jQuery code, removeClass is not working. Whenever I click hide link the .close element is not getting removed in IE6.0 but it works in firefox and IE8.0, Below is my jQuery code:
$(document.ready(function()){
toggleNodes = function(node,action){
var $componentone = $('.componentone', node);
if (action == undefined || action == 'hide'))) {
$componentone.addClass('closed');
$componentone.hide();
}
else if (action=='undefined'||action=='view'){
$componentone.removeClass('closed');
$componentone.show();
}
}
});
`close’ is declared as below in .css file:
.componentone{
margin-left:10px;
padding-left:15px;
border:1px solid #fff;
border:0px solid #ddd;
}
.componentone.closed{
margin-left:10px;
padding-left:15px;
border:1px solid #fff;
border:0px solid #ddd;
}
And in JSP I have used it like this:
<div="componentone">body of div</div>
<div="component">body of div new</div>
your else condition has a syntax error