jquery - Add css class to dynatable columns -


मैं dynatable उत्पन्न एक वर्ग नाम जोड़ने का प्रयास कर रहा / रही हूं & lt; td & gt; s, लेकिन मुझे नहीं पता कि कैसे मैंने इसे करने की कोशिश की है, लेकिन काम नहीं करता:

  & lt; तालिका id = "my-final-table" & gt; & LT; thead & gt; & LT; वें & gt; बैंड & lt; / वें & gt; & LT; वें & gt; सांग & lt; / वें & gt; & lt; th शैली = "प्रदर्शन: कोई नहीं;" वर्ग = "टीडी-आईडी" & gt; आईडी & lt; / वें & gt; & Lt; / thead & gt; & LT; tbody & gt; & Lt; / tbody & gt; & Lt; / तालिका & gt;   

मैं td-id को अंतिम & lt; td & gt; से जोड़ना चाहते हैं।

  वेर जसोंडाटा = ["बैंड": "वीज़र", "गाना": "एल स्कॉर्को", "आईडी": 1}, {"बैंड": "चैवेलल", "गाना": "परिवार प्रणाली", "आईडी" : 2}]; var processingComplete = function () {$ ('# my-final-table tr')। पर ("क्लिक करें", फ़ंक्शन () {console.log ($ (this));}); }; $ ('# my-final-table')। dynatable ({डेटासेट: {रिकॉर्ड: jsondata}})। बाइंड ('dynatable: afterprocess', प्रसंस्करण पूर्ण); processingComplete ();   

लेकिन पंक्ति html ऐसा होता है जब मैं एक पंक्ति पर क्लिक करता हूं:

  & lt; td style = "text- संरेखित करें: केंद्र; "& gt; चेवेलल & lt; / td & gt; & lt; td शैली = "टेक्स्ट-संरेखन: केंद्र;" & gt; पारिवारिक सिस्टम & lt; / td & gt; & lt; td शैली = "प्रदर्शन: कोई नहीं; पाठ-पंक्ति: प्रारंभ;" & gt; 2 & lt; / td & gt; JSFiddle:   

आप ऐसा कुछ कर सकते हैं -

/ p>

  $ ('tr')। प्रत्येक (फ़ंक्शन () {$ (this)। Find ('td')। eq (1) .addClass ('yellow');})   



Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -