Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    45
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Javascript and CSS

    Hi,

    I have a js file with this function

    function wrapText(){

    var workArea = "";
    var openTag = '<span class=red>';

    .....etc

    }

    The css file called something.css is saved in the same folder as the js file, however I do not think it the variable "openTag" is refering to the class specified in the css file.
    any ideaS?

    THANKS

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,380
    Thanks
    11
    Thanked 592 Times in 572 Posts
    Code:
    var openTag = '<span class="red">';
    also, firebug can let you browse a page's elements so you can quickly ascertain what's being applied to what.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.6, IE11:9.1, IE9:3.1, IE10:3.0, FF:17.2, CH:46, SF:11.4, NON-MOUSE:38%


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •