jQuery: The Write Less, Do More JavaScript Library

 « Return to Thread: how i can access classes in my div?

Re: how i can access classes in my div?

by luciano mazzetto :: Rate this Message:

Reply to Author | View in Thread


how i could do it`s commands?

On 12 maio, 22:35, darren <minof...@...> wrote:

> you could even use commas in your selector so that you aren't
> repeating your statements.
>
> On May 12, 5:51 pm, Luciano <lmazze...@...> wrote:
>
> > hdfsuahd it`s ok ok..
> > i forgot space.."#box2. bloc-top"
>
> > On 12 maio, 20:35, Luciano <lmazze...@...> wrote:
>
> > > how i can access classes in my div?
> > > example:
>
> > > $("#box1.bloc-top").click(function () {
> > >           $(".bloc-center").slideToggle("slow");
>
> > > });
>
> > > $("#box2.bloc-top").click(function () {
> > >           $(".bloc-center").slideToggle("slow");
>
> > > });
>
> > > $("#box3.bloc-top").click(function () {
> > >           $(".bloc-center").slideToggle("slow");
>
> > > });
>
> > > <div id="box1" class="box">
> > >      <bloc-top>content top</bloc-top>
> > >      <bloc-center>content slideToggle</bloc-center>
> > > </div>
>
> > > <div id="box2" class="box">
> > >      <bloc-top>content top</bloc-top>
> > >      <bloc-center>content slideToggle</bloc-center>
> > > </div>
>
> > > etc..
> > > i tryed this it but no success

 « Return to Thread: how i can access classes in my div?