<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".preview_link").click(function(){
$(this).prev(".content_box_information") .slideToggle("slow");
$(this).toggleClass("active"); return false;
});
});
</script>
<style type="text/css">
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}:focus{outline:0;}body{background:#111;line-height:1;}ol,ul{list-style:none;}table{border-collapse:separate;border-spacing:0;}caption,th,td{text-align:left;font-weight:normal;}a{color:black;text-decoration:none;}a:hover{text-decoration:underline;}#wrap{width:760px;margin:0 auto;padding-top:160px;}.content_box{background:#777;border:1px solid #999;display:inline;float:left;height:156px;margin:0 20px 18px 0;padding:16px 22px 30px;_padding-bottom:9px;position:relative;width:264px;}.content_box_images{width:258px;height:138px;border:1px solid #999;}.content_box_information{display:none;font-size:12px;line-height:17px;background:#CCC;height:86px;width:189px;color:#000;overflow:hidden;padding:12px 0 0 15px;position:absolute;top:40px;left:50px;}h2 a{color:#ccc;float:left;}.content_box-info{float:right;margin:10px 4px 0 0;}table.popup-contents th{text-align:left;width:60px;}table.popup-contents td{text-align:left;}
</style>
</head>
<body>
<div id="wrap">
<div class="content_box">
<a href="#"><img class="content_box_images" src ="http://imgur.com/ZYhLd.jpg"></a>
<div class="content_box_information">
<table class="popup-contents">
<tr>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s
</tr>
</table>
</div>
<h2><a href="#" >Title</a></h2>
<a class="preview_link" href="#" rel="nofollow">Preview</a>
</div>
<div class="content_box">
<a href="#"><img class="content_box_images" src ="http://imgur.com/ZYhLd.jpg"></a>
<div class="content_box_information">
<table class="popup-contents">
<tr>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s
</tr>
</table>
</div>
<a class="preview_link" href="#" rel="nofollow">Preview</a>
<h2><a href="#" >Title</a></h2>
</div>
</div>
</body>
</html>
the problem is the toogleclass is working properly if I did not add any elemnts before the toggleclass link.but when I add an element before it the toggle class is not working.Please someone help me.I want the toggle link just after the h2 title.Please help me.