Be the first to write a review
Expanding Content Boxes with jQuery Part Two
Welcome to Part 2 of the content box tutorial. In the first part we looked at embedding a single box of content on our page. In this part, we're going to look at having multiple boxes on the same page. We can't just use and build upon the same code that we ended Part 1 with because there were too many assumptions made by the code. The new buttons that were dynamically added following an expansion or collapse of the box, for example, were just added to all instances of <div> elements with a class of .title, knowing that this would only refer to one element.
Dan Wellman
Dan Wellman is an author and web developer based in the UK. Dan has written three books so far; the latest, jQuery UI 1.7: The User Interface Library for jQuery, was released at the end of 2009.
Dan has been writing web development tutorials for over 5 years and works by day for a local digital media agency in his home town of Southampton.