Use backgroung-color instead of background:
$(this).css({backgroundColor: '#aaaaaa'});
or
$(this).css('background-color', '#aaaaaa');
문제
I have a JavaScript function as:
($('.expand').parent().next().children('li')).click(function() {
$(this).css('background','#aaaaaa');
window.location=($(this).children('a')).attr('href');
});
I am getting background color in ios devices but not working in samsung android native browsers.
Did anyone came across this issue. Please advice.
Edited
If I use
($('.expand').parent().next().children('li')).click(function() {
$(this).css('background','#aaaaaa');
});
without window.location I am getting the background color but I want both bgcolor and redirection
해결책
Use backgroung-color instead of background:
$(this).css({backgroundColor: '#aaaaaa'});
or
$(this).css('background-color', '#aaaaaa');