1

I'm trying to do something very simple in Jquery which i just cant get to fire properly.

The thing is, i'm writing this code in a separate HTML file on the same server and using PHP "include" to use it, the jQuery src is held on Google and referenced in the main index.php head tag.

<script src="text/javascript">
        $(document).ready(function(){
            $("#xmasOpen").click(function(){
                $("#xmas").toggleSlide();
            });
            return false;
        });
    </script>

I've set #xmas to display: none in the CSS but just cant get it to action the jQuery if i click the href with id xmasOpen!?

Anyone?

benhowdle89
  • 35,602
  • 65
  • 197
  • 321

2 Answers2

4

The method -name is "slideToggle" instead of "toggleSlide" ^^

Dr.Molle
  • 115,009
  • 15
  • 189
  • 197
2

Move return false into the click handler.

SLaks
  • 837,282
  • 173
  • 1,862
  • 1,933