0

How can i change this function which is currently appending a CSS class to a div on HTML

if (!this.sortDisabled) {
        var $th = $(this).addClass(table.config.cssHeader);
        if (table.config.onRenderHeader) table.config.onRenderHeader.apply($th);
}

to make to append this instead of adding class "table.config.cssHeader"

'&nbsp<font face="webdings">6</font>'

So my question explained is how can i get this

if (!this.sortDisabled) {
    var $th = $(this).addHTMLCODE(&nbsp<font face="webdings">6</font>);
    if (table.config.onRenderHeader) table.config.onRenderHeader.apply($th);
}
1
  • 2
    Incidentally: font is obsolete, so don't use that. Alternatives would include using a span with a specific class for styling, or perhaps an em, or strong element. Among many, many others. Commented Feb 4, 2013 at 2:55

1 Answer 1

1

It looks like you're using jQuery. You're pretty close; instead of addHTMLCODE, you need append, and you also need to quote the HTML:

var $th = $(this).append('&nbsp<font face="webdings">6</font>');
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.