Friday, March 2, 2012

set the color of text that is in span in HTML in jquery

var color = 'red';
function fnSetColor(loopname, color) {
                $("div[id*='lstSelectedLoop'] ul li span").each(function () {
                    if ($(this).html() == loopname) {
                        $(this).css("color", color);
                    }
                })
            }

No comments:

Post a Comment