0

Why doesn't this simply jQuery ajax code not load pull.php into the div with id of #alert?

...
    <script src="jquery.js"></script>
    <script>
        $(document).ready(function() {
            $(".pull_button").click(function() {
                $("#alert").load("pull.php");
            });
        });
    </script>
</head>
<body>
    <div id="#alert"></div>
    <nav>
        <a class="pull_button">Pull Data</a>
    </nav>
...
Donald T
  • 10,234
  • 17
  • 63
  • 91

1 Answers1

5

Take the # out of <div id="#alert">.

<div id="alert">     -> $('#alert')
<div class="alert">  -> $('.alert')
Tatu Ulmanen
  • 123,288
  • 34
  • 187
  • 185