Force browser to redraw favorite icon

on src change
This commit is contained in:
Sugaroverdose 2015-01-14 22:09:09 +03:00
parent 5f7c115dfe
commit b2de3b3d8d
1 changed files with 1 additions and 0 deletions

View File

@ -53,6 +53,7 @@
*/
function toggleStar($actionEl, state) {
$actionEl.find('img').attr('src', getStarImage(state));
$actionEl.hide().show(0); //force Safari to redraw element on src change
$actionEl.toggleClass('permanent', state);
}