0

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?

4 Answers 4

6

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

$j(this).css("color", "#155D97");
2
  • I missed that comma. Nice catch.
    – Nalum
    Aug 31, 2010 at 10:57
  • 1
    @Nalum: Thanks! I'm extra happy with the way "comma" happened to be followed by ",", and "colon" happened to be followed by ":" :P Aug 31, 2010 at 11:00
2

Change color: to color see if that does it.

0
1

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

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

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.