आप jQuery द्वारा विशेषता id
को कैसे हटा सकते हैं?jQuery के लिए 'removeID`' रखने के लिए `removeClass`
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"); // problem here
alert ("Question is now not spam.");
});
इस कोड
<div id="yellow" class="question_box">
में निम्नलिखित पीला -attribute निकाल देना चाहिए हालांकि, यह काम नहीं करता। कारण removeClass
फ़ंक्शन की संभावना बहुत अधिक है। मैं स्पष्ट रूप से गलत फ़ंक्शन का उपयोग करता हूं, क्योंकि मैं आईडी का उपयोग करना चाहता हूं। http://docs.jquery.com/Attributes/removeAttr
अपने जवाब के लिए धन्यवाद! –
आप पहचानकर्ता को क्यों हटा रहे हैं? ऐसा लगता है कि आप कुछ अजीब व्यापार तर्क कर रहे हैं। – epascarello