| 1 |
|
| 2 |
/** |
| 3 |
* Blink specific HTML element to set attention to this element. |
| 4 |
* |
| 5 |
* @param {string} element_to_blink - class or id of element: '.wpbc_widget_available_unavailable' |
| 6 |
* @param {int} how_many_times - 4 |
| 7 |
* @param {int} how_long_to_blink - 350 |
| 8 |
*/ |
| 9 |
function wpbc_blink_element( element_to_blink, how_many_times = 4, how_long_to_blink = 350 ){ |
| 10 |
|
| 11 |
for ( let i = 0; i < how_many_times; i++ ){ |
| 12 |
jQuery( element_to_blink ).fadeOut( how_long_to_blink ).fadeIn( how_long_to_blink ); |
| 13 |
} |
| 14 |
jQuery( element_to_blink ).animate( {opacity: 1}, 500 ); |
| 15 |
} |
| 16 |
|