Reputation: 858
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?
Upvotes: 0
Views: 208
Reputation: 2541
Since you are using mootools, why not simply do $('detail_showDiv').toggle();
in your click handler?
Check it out in the mootools docs.
Upvotes: 2