cb04cfc6246771893f4655a47a3e56fe2803daf5
[unfold.git] / static / js / plugin.js
1 /* upon document completion, we locate all the hide and show areas, 
2  * and configure their behaviour 
3  */
4 /* xxx missing - see plugin.php 
5  * if (typeof jQuery('#$uuid').$title != 'undefined') {
6  * jQuery('#$uuid').$title('show');
7  * }; 
8  */
9
10 $(document).ready(
11     function() {
12         $('.plugin-hide').each(function(p) {
13             plugin='#'+$(this).attr('id').replace('hide-','plugin-');
14             show='#'+$(this).attr('id').replace('hide-','show-');
15             type=$(this).attr('plugin-type');
16             $(this).click(function () { jQuery(plugin).hide(); jQuery(show).show(); $(this).hide();})
17         })
18         $('.plugin-show').each(function(p) {
19             plugin='#'+$(this).attr('id').replace('show-','plugin-');
20             hide='#'+$(this).attr('id').replace('show-','hide-');
21             type=$(this).attr('plugin-type');
22             $(this).click(function () { jQuery(plugin).show(); jQuery(hide).show(); $(this).hide();})
23         })
24             })
25
26