I am trying to change the effect of the tooltip based on what the user chooses from a select menu. My problem is that the selected effect works only for the value that's selected by default (like in the HTML code below where "bounce" is selected), but it doesn't change the effect once I choose something else. Any ideas how to fix this?
My code:
$(document).ready(function(){
$("#tltp").tooltip({
show: { effect: $("#tooltip-effect").val(), duration: 400}
})
});
HTML:
<select id="tooltip-effect">
<option value="none">Select an animation</option>
<option value="bounce" selected>Bounce</option>
<option value="clip">Clip</option>
<option value="drop">Drop</option>
<option value="explode" >Explode</option>
<option value="shake">Shake</option>
</select>
<input id="tltp" type="text" title="Enter a name">