CSS styles change on hover state with JQuery if else statement
$(document).ready(function() {
$('body').mouseover(function() {
if ($('.comsec1').is(':hover')) {
$('.comsec2').css('width','40%');
$('.comsec1').css('width','60%');
}
else if ($('.comsec2').is(':hover')) {
$('.comsec2').css('width','60%');
$('.comsec1').css('width','40%');
}
else {
$('.comsec2').css('width','50%');
$('.comsec1').css('width','50%');
}
});
});