1 /* upon document completion, we locate all the hide and show areas,
2 * and configure their behaviour
4 $(document).ready(function() {
5 $('.plugin-hide').each(function() {
6 $(this).click(function () {
7 var plugin='#'+$(this).attr('id').replace('hide-','plugin-');
8 var show='#'+$(this).attr('id').replace('hide-','show-');
9 jQuery(plugin).hide(); jQuery(show).show(); $(this).hide();});
11 $('.plugin-show').each(function() {
12 $(this).click(function () {
13 var plugin='#'+$(this).attr('id').replace('show-','plugin-');
14 var hide='#'+$(this).attr('id').replace('show-','hide-');
15 jQuery(plugin).show(); jQuery(hide).show(); $(this).hide();});