The syntax is correct. Is the jquery library included? You need to include something like
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></ script> Also look at the javascript console for possible errors. On Dec 27, 8:21 pm, Sahil Arora <sahilarora...@gmail.com> wrote: > I tried this code to see the jquery effect. > > <div class="one" id="a" onclick="jQuery('.two').slideToggle()">Hello</div> > <div class="two hidden" id="b">World</div> > > but onclicking on Hello slide Toggles but nothing appears( 'world' doesn't > appear).Just a blank line. > > -- > Sahil Arora > B.Tech 2nd year > Computer Science and Engineering > IIT Delhi > Contact No: +91 9871491046 > Homepage-www.cse.iitd.ac.in/~cs1090213