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() {
});