Title: changing div height using jquery
Last modified: August 20, 2016

---

# changing div height using jquery

 *  [Mart89](https://wordpress.org/support/users/mart89/)
 * (@mart89)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/changing-div-height-using-jquery/)
 * Hi, I have a simple bit of jquery I want to include in my site:
 * $(‘#banner2’).click(function(){
    $(this).animate({height:’300′}) })
 * as shown here:
    [http://jsfiddle.net/tJugd/](http://jsfiddle.net/tJugd/)
 * When i try to include this code in my header.php however, nothing seems to happen.
 * I have another piece of jqeury in the header (for isotope), which seems to work
   fine, it all looks like this:
 * <?php wp_head(); ?>
 * <script type=”text/javascript”>
    jQuery(document).ready(function(){ var mycontainer
   = jQuery(‘#isocontent’); mycontainer.isotope({ itemSelector: ‘.box’ });
 *  // filter items when filter link is clicked
    jQuery(‘#options a’).click(function(){
   var selector = jQuery(this).attr(‘data-filter’); mycontainer.isotope({ filter:
   selector }); return false; });
 *  $(‘#banner2’).click(function(){
    $(this).animate({height:’300′}) })
 * });
    </script>
 * I don’t really understand jquery syntax, so I dont know if my use of ‘});’ is
   correct, but ive tried a few different arrangements to no avail.
 * Thanks

The topic ‘changing div height using jquery’ is closed to new replies.

## Tags

 * [change](https://wordpress.org/support/topic-tag/change/)
 * [div](https://wordpress.org/support/topic-tag/div/)
 * [height](https://wordpress.org/support/topic-tag/height/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [resize](https://wordpress.org/support/topic-tag/resize/)
 * [size](https://wordpress.org/support/topic-tag/size/)

 * 0 replies
 * 1 participant
 * Last reply from: [Mart89](https://wordpress.org/support/users/mart89/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/changing-div-height-using-jquery/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
