Sangeeta
Sangeeta

Reputation:

need to add .css to a class

I need to add some css to a class. This is what I have so far:

$(document).ready(function() {
    $('.tech').css({ "border-bottom": "dotted 1px #0860a8", "text-decoration": "none" });
    $('.tech').Tooltip(onMouseEnter) 
});

Its not working. What can I do to show up for all class="tech"

Upvotes: 0

Views: 109

Answers (2)

Stobor
Stobor

Reputation: 45122

You're missing a dot...

$('.tech').css({ 
         "border-bottom": "dotted 1px #0860a8", 
         "text-decoration": "none" 
});

To select a class, use .classname and to select an id, use #id respectively.

Upvotes: 2

carl
carl

Reputation: 50534

Try this:

$('.tech').css({ "border-bottom": "dotted 1px #0860a8", "text-decoration": "none" });

(note the period before tech)

Upvotes: 2

Related Questions