I developed this plugin while working on one of my projects. Since I couldn't find a plugin that could have solved a all of my use cases, I decided to develop my own.
To use the plugin, first include the jQuery library and then the switchTarget javascript file in the head of your file.
<script src="js/jquery.js" type="text/javascript"></script> <script src="js/jquery.switchTarget.1.0.js" type="text/javascript"></script>
Following the example below, create links and targets.
<a ...