Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- var _slideLink = $('a.slide-btn');
- _slideLink.each(function(i, link){
- if (!$(link).is('.active')) $(link).parent().next('.slideblock').hide();
- });
- _slideLink.click(function(){
- $(this).toggleClass('active');
- $(this).parent().next('.slideblock').slideToggle(300);
- return false;
- });
- });
- -----------------
- <div class="img-block">
- <img src="images/photo-lorem.jpg" alt="Image" width="145" height="149" />
- <h5>Lorem Blah Blah.</h5>
- <p>I came to rock! <a class="go-btn2 slide-btn" href="#"> </a></p>
- </div>
- <!-- Slide block -->
- <div class="slideblock">
- <p>I believe the children are our future</p>
- </div>
Add Comment
Please, Sign In to add comment