ThemeShaper Forums » Thematic

Toggle/Show/Hide a widget or div.

(2 posts)
  • Started 4 years ago by Brydave
  • Latest reply from Chris
  • This topic is not resolved
  1. Brydave

    Hi everyone,

    I found this tutorial at, and am trying to implement it in my header, however I can't seem to get it to work.

    link to tutorial:

    basically I've added a widgetized area in my header by adding it into my functions.php:

           	'name' => 'Expand Aside',
           	'id' => 'expand',
           	'before_widget' => '<li id="%1$s" class="widgetcontainer %2$s">',
           	'after_widget' => "",
    		'before_title' => "<h3 class=\"widgettitleexpand\">",
    		'after_title' => "</h3>\n",

    The widget displays fine, and I've changed the tutorial code accordingly:
    (#expand is the div id I added to the #header)

    <script type="text/javascript">
    //for toggling widgets
    function toggleWidgets() {
    	jQuery('#expand h3.widgettitleexpand').addClass('plus'); 
    	jQuery('#expand h3.widgettitleexpand').click(function() {
    } jQuery(document).ready(function() {

    I don't know if it's just not using wp_enqueue_script('jquery'); or what, so any suggestions would be really appreciated since I am definitely a jquery noob...

    Thanks again!

    Posted 4 years ago #
  2. Hi,

    you forgot a ) before closing the script tag.


    Posted 4 years ago #

RSS feed for this topic


You must log in to post.