Change highlight color

Viewed 46015

jQuery's highlight method will highlight any div with a yellow background.

How do I specify what color to use instead of yellow for highlight?

4 Answers

According to the documentation:

$(this).effect("highlight", {color: 'blue'}, 3000);
$("div").click(function () {
    $(this).effect("highlight", { color: "#ff0000" }, 3000);
});

will highlight in red. It's all in the documentation.

Related