views:

46

answers:

1
window.addEvent('domready', function(){ 

 $('detail_block_table').addEvent('click', function(){

      if ($('detail_showDiv').getStyle('display') == 'none')
      {
          $('detail_showDiv').setStyle('display','block');
      }
      else
      {     
          $('detail_showDiv').setStyle('display','none');
      }

   });

});

This is the code, it looks fine but something prevents it from working.

Any ideas?

+2  A: 

Since you are using mootools, why not simply do $('detail_showDiv').toggle(); in your click handler?
Check it out in the mootools docs.

npup