Support » Themes and Templates » jquery – What am I doing wrong?

  • Resolved Moobs

    (@nickyb713)


    So I’m in the process of designing my own WP theme off of the twentyten theme, and for a great deal of time now I have been trying to get about 7 divs to have an equal height. I have tried every variation of height in CSS that’s applicable and faux columns with no luck. Over the past couple days I decided to move on to javascript and jquery for a solution. From what I’ve read everything should be correct, but that’s clearly not the case since nothing has changed with my theme.

    Here’s the script that I’ve added to my header.php file within the head tag:

    <script type="text/javascript" src="js/jquery-1.2.6.pack.js"></script>
     <script type="text/javascript" src="js/jquery.equalHeight.js"></script>
     <script type="text/javascript">
        $(function(){
            $('.container').equalHeight();
        });
    </script>

    Here’s a link to the script that was placed in the JS folder called “jquery.equalHeight.js”:
    http://pastebin.com/AZbFQ2pW

    First I tried changing all the classes of the divs that I needed passed through the script to container in the index file. After I saw that there was no change I gave a class of container to the same divs in the single.php file as well, but no dice.

    This is all relatively new to me so hopefully I’m making a mistake obvious to someone who can help me out.

    Please help me resolve this issue because it has been a major headache.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘jquery – What am I doing wrong?’ is closed to new replies.