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/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.