calebjacob / tooltipster

A jQuery tooltip plugin
MIT License
2.76k stars 482 forks source link

Add options for tooltipster to maintain content in instance of hiding or closing #817

Closed jayghgh closed 3 years ago

jayghgh commented 3 years ago

Lets say, I have a sets radio inputs in tooltipster

<input checked form='someform'  type='radio' name='gender' value='F' /><input type='radio' name='gender' form='someform'  value='M'/>

NB: the form'someform' is not part tooltipster but part of the DOM body and its waiting for inputs in toolstipster when it get submitted.

At the time of activating tooltipster, one radio was checked...and the user want to select another option of the radio.

I noticed, once tooltipster closes or hide ....the input in the tooltipster becomes not part of the form'someform' input.to Therefore, there should be an option for toolstipster to maintain dynamic content.

example: maintainDynamicContent:true;

louisameline commented 3 years ago

That's because you recreate the DOM elements at each opening. Just provide the same html tree each time and you'll be good.