javascript - jquery addClass adding subclass not working -


this 1st time posting here, can give me advice!

<html>  <head>    <style>     </style>    <script src="jquery-1.5.2.js"></script>  </head>  <body>   <div  class="super" style="  border: solid black 1px;  height:100px; width:100px; "> </div>   <div class="super .eight" style="  background: blue; "> </div>    <script>    $(".super").click(function () {       $(this).addclass(" .eight"); }); </script>   </body>  </html>  

so problem want add example background or other type of element onto class defined super. trying use subclasses not seem working.

please ask me if there unclear, apologize if there is.

no dot (in classname).

 $(".super").click(function () { $(this).addclass("eight"); }); 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -