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
  • 36,900
  • 69
  • 202
  • 331

2 Answers2

4

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

Dr.Molle
  • 116,463
  • 16
  • 195
  • 201
2

Move return false into the click handler.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964