Skip to main content

Bug Tracker

Side navigation

Ticket #2588: jquery_test.html
File jquery_test.html, 0.7 KB (added by davidserduke, March 27, 2008 04:32AM UTC)

test case

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <title>Tester</title>
    <style type="text/css">
      #container { background:yellow; width:200px; }
    </style>
    <script type="text/javascript" src="../jquery.js"></script>
    <script type="text/javascript">
      $(function () {
        $("button:first").click(function () {
              $(".class2").css("background", "yellow");
              var s = "class2 turned yellow";
              $("#adiv").text(s);
            });
      });
    </script>
  </head>
  <body>
    <button>Do It</button>
    <div class="class1 class2 class3">1235</div> 
    <div id="adiv"></div>
  </body>
</html>

Download in other formats:

Original Format