How to remove attribute idusing jQuery?
jQuery('a.no_flag_question').live('click', function(){
jQuery.post('/codes/handlers/no_flag_question.php',
{ question_id: jQuery(this).attr('rel') });
$(".question_box").removeClass("yellow");
alert ("Question is now not spam.");
});
This code should remove the next yellow attribute in
<div id="yellow" class="question_box">
However, this does not work. Probably the reason is the function removeClass. I am apparently using the wrong function since I want to use an identifier.
source
share