I am working with jQuery and when I call the removeClass() function is not working in IE6.0, what could be the reason? The .removeClass() function is working as expected in IE8.0 and Firefox.
<html>
<head>
<title>my Page</title>
<style type="text/css">
.message-header{
margin-left:10px;
padding-left:15px;
border:1px solid #fff;
border:0px solid #ddd;
}
.message-header.closed{
margin-left:10px;
padding-left:15px;
border:1px solid #fff;
border:0px solid #ddd;
}
</style>
</head>
<body>
this is my jsp.
<script>
$(document.ready(function()){
var $content = $('.message-header', node);{
if (action == 'hide') {
$content.addClass('closed');
$content.hide();
}
else if (action == 'view') {
$content.removeClass('closed');
$content.show();
}
});
</script>
</body>
</html>
You have a stray opening brace. And your
document.readysyntax is wrong.Here is a corrected version.