Sunday, 25 August 2013

how to check the div value in javascript

how to check the div value in javascript

how to set the div CSS styles using javascript? i have a problem on
getting the value of class name. please help if anyone know it.
var className = $('.divname').attr('class');
var t = 'divalue';
if(className == t){
$('.divname').css('background', '#0962ae');
}

No comments:

Post a Comment