tags:

views:

57

answers:

4

Hi, simplest thing ever but here:

$j(".srch-txt").click(function() {
$j(this).css("color:" "#155D97")
});

$j is a no conflict

So it's pretty easy to see what I'm trying to do: When the .srch-txt element is clicked, change its color to #155D97.

Where have I gone wrong?

thanks!

+2  A: 

Change color: to color see if that does it.

Nalum
+1 nice and fast :)
altCognito
Nope, did't help.
Kyle Sevenoaks
Check Tomas Lycken's answer
Nalum
+1  A: 

You don't need the ':' after the css property.

altCognito
+6  A: 

You're forgetting a comma, and you have an extra colon:

$j(this).css("color", "#155D97");
Tomas Lycken
I missed that comma. Nice catch.
Nalum
@Nalum: Thanks! I'm extra happy with the way "comma" happened to be followed by ",", and "colon" happened to be followed by ":" :P
Tomas Lycken
Aha, thanks! Works perfectly now :)
Kyle Sevenoaks
+1  A: 
$j(".srch-txt").click(function() {
$j(this).css("color", "#155D97")
});