Skip to content

Commit

Permalink
Fixes Issue #80. Props @gregory-hk
Browse files Browse the repository at this point in the history
  • Loading branch information
chipbennett committed Nov 26, 2012
1 parent 2f32a9e commit f6f6fd0
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions functions/widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,13 @@ function oenology_setup_widgets() {
} // function oenology_widget_setup()

function oenology_showhide_widget_content_open() {
$showhide_id = 'widget-' . mt_rand();

$showhide = '<span class="showhide">';
$showhide .= 'Click to <span style="color:#5588aa;" onclick="document.getElementById(\'' . $showhide_id . '\').style.display=\'inline\';">view</span> / <span style="color:#5588aa;" onclick="document.getElementById(\'' . $showhide_id . '\').style.display=\'none\';">hide</span>';
$showhide .= '</span>';
$showhide .= '<br /><br />';
$showhide .= '<div id="' . $showhide_id . '" style="display:none;">';

return $showhide;
$showhide = '<span class="showhide">';
$showhide .= 'Click to ';
$showhide .= '<span style="color:#5588aa;" onclick="d=this.parentElement.nextElementSibling; d.style.display==\'none\' ? d.style.display=\'block\' : d.style.display=\'none\';">view/hide</span>';
$showhide .= '<br /></span>';
$showhide .= '<div>';

return $showhide;
}

function oenology_showhide_widget_content_close() {
Expand Down

0 comments on commit f6f6fd0

Please sign in to comment.