it’s been a long day and I think I just have code blindness but..
Trying to figure out if an element contains a number, do something to another element.
result_val = 9;
$(".result").contains("+result_val+") (function() {
$(".parag").css("color", "#eee");
});
Maybe I’m taking the wrong approach? But there is no effect on the .parag div.
Try this:
Or to get a boolean
Live DEMO: http://jsfiddle.net/xzeCq/2/