addClass for search labels

This commit is contained in:
Sanj 2011-10-25 18:58:15 +01:00
parent 0c70b98fbb
commit a74fdceae9

View File

@ -1,5 +1,5 @@
var labelMap = {
'id_q': '<h2>Search</h2>',
'id_q': '<h2>Search:</h2>',
'id_models_0': 'You could also narrow your search.<br />Select a category.'
}
@ -7,7 +7,7 @@ $(function() {
for (var i in labelMap) {
if (labelMap.hasOwnProperty(i)) {
if ($('label[for=' + i + ']').length > 0) {
$('label[for=' + i + ']').eq(0).html(labelMap[i]);
$('label[for=' + i + ']').eq(0).addClass(i).html(labelMap[i]);
}
}
}