Thanks Shawn,
however it is still not working for me, I presume because .boxcontent
is not a sibling of .closeimage_left but is a sibling of <div
id="box_1" class="box">
So, should I have to find the parent div then find the
sibling .boxcontent?
any idea how i would do this?


On Apr 24, 2:07 am, Shawn <[EMAIL PROTECTED]> wrote:
> oops.. that should probably be a .toggle() instead of a .hide()
>
> Shawn
>
> Shawn wrote:
>
> > $(".closeimage_left").click( function () {
> >   $(this).siblings(".boxcontent").hide();
> > });
>
> > That *should* do the trick.
>
> > Shawn
>
> > thekman wrote:
> >> Hi all,
> >> I have code something like:
>
> >> <div id="box_1" class=box>
> >>   <div id="close_1_a" class="closeimage_left"></div>
> >>   <div id="title_1" class="boxtitle">Box Title</div>
> >>   <div id="close_1_b" class="closeimage_right">Box Title</div>
> >>   <div id="content_1" class="boxcontent">box content...</div>
> >> </div>
> >> <div id="box_2" class=box>
> >>   <div id="close_2_a" class="closeimage_left"></div>
> >>   <div id="title_2" class="boxtitle">Box Title</div>
> >>   <div id="close_2_b" class="closeimage_right">Box Title</div>
> >>   <div id="content_2" class="boxcontent">box content...</div>
> >> </div>
>
> >> All numbers are dynamically generated from the database.
>
> >> What is the best way to use jquery to close the correct content div?
> >> I am presuming I would use something like below, but what do I put in
> >> the click function?
>
> >> $(".closeimage_left").click(function() {
> >>    });

Reply via email to