How to turn a specific tab active when a link is clicked?

How to turn a specific tab active when a link is clicked?

I have the layout like is in the fiddle using bootstrap tabs.

The issue with this context is that when a pagination link is clicked in some tab, for example, if the user is in the tab "Draft" tab inside "My Congresses" tab, and clicks in the pagination link "2", the url changes to " http://proj.test/user/profile?page=2#myCongresses" but the tab that become active his the first one ("Update user info") tab. Then if the user clicks in "My Congresses" it appears the results of the page 2, but the user needs to manually click in the "My Congresses".

Do you know what is necessary to turn, in this case, the "My Congresses" tab active when a pagination page link is clicked in the "My Congresses" tab?


Example:  https://jsfiddle.net/2xahspct/5/ (but without the pagination working, I don't know if is possible to have a demo of that in a fiddle)