I want to style within JS

Posted by 422 on Stack Overflow See other posts from Stack Overflow or by 422
Published on 2010-12-24T00:37:52Z Indexed on 2010/12/24 0:54 UTC
Read the original article Hit count: 142

Filed under:

Issue I have is I can use tags, but I would like to style particular words. Adding a class doesnt work, is it because I am within script dom ?

Example:

var config = [
                {
                    "name"      : "tour_1",
                    "bgcolor"   : "black",
                    "color"     : "white",
                    "position"  : "BR",
                    "text"      : "Customize your user profile, it's easy. This is your shop window on <strong>here</strong> and <strong>there</strong>",
                    "time"      : 4000
                }

Instead of strong, I would like to apply class, like

<p class="orange">

But it wont have it, any suggestions... please

© Stack Overflow or respective owner

Related posts about JavaScript