jQuery has .hover function which will freeze the hover effect.
It’d be better to just give that state another class itself in the CSS and then use your method to add that class.
You may keep the id of the div and control the css changes using class
id2:hover { background-color: #23689D; }
$('#id').attr('class', 'id2');
What do you think?