Enqueue script/style if certain widget has certain value

Actually these types of task is for plugin not for widget. Based on the value of widget instance scripts can be enqueued to footer not in head or just after body tag. Reason behind this is the instance value can be checked inside the function widget of widget class. The function widget is called when a certain dynamic sidebar is called and this must occurs when wp_head() and wp_body_open hook is already fired but still there is a chance to enqueue scripts to footer.

tech