I use jquery-ui-tabs so that users can create their own tabs and then switch between tabs as they see fit. The content in widgets is small widgets that look like mini-programs. Then users can choose which widgets they want on any tab.
This works fine as long as any widget is installed only on tab 1, however, everything starts to go wrong when any widget is added to 2 tabs or more. When widgets are generated, they use the identifier from the database. For instance. If this widget is added to two or more tabs, they end with two divs with id id, for example widget_1, which causes problems, as you can imagine.
So my question is: what is the best way to solve such a problem?
I wish I knew earlier that they want to have the same widget on more than one tab. I have a feeling that this will almost be a complete rewrite ...
source
share